thubanframe question
Didrik Pinte
dpinte at itae.be
Tue Jun 13 17:26:15 CEST 2006
Le mardi 13 juin 2006 à 15:27 +0200, Martin Schulze a écrit :
> Didrik Pinte wrote:
> > What is the exact aim of the following method in Thuban/UI/ThubanFrame?
> >
> > def OnClose(self, event):
> > # FIXME: Shouldn't this really be in OnDestroy?
> > if self.parent.dialogs.has_key(self.name):
> > self.parent.remove_dialog(self.name)
> > self.Destroy()
>
> It first removes the dialog from the queue of the parent and then
> destroys the dialog itself. When a dialog is created, it is placed
> into the parent queue.
>
> Regards,
>
> Joey
For, sure, that was clear BUT the dialogs dictionnary is described in
the Thuban/UI/mainwindow.py as follow :
def init_dialogs(self):
"""Initialize the dialog handling"""
# The mainwindow maintains a dict mapping names to open
# non-modal dialogs. The dialogs are put into this dict when
# they're created and removed when they're closed
self.dialogs = {}
Why does the ThubanFrame class be concerned by the dialogs ? A wx.Frame
is not a wx.Dialog and by the way not a non-modal dialog.
Can we consider those specific lines from ThubanFrame.OnClose as
useless ?
Didrik
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)