thubanframe question

Bernhard Reiter bernhard at intevation.de
Tue Jun 27 20:38:23 CEST 2006


Am 13. Jun 2006 um 15:26:15 schrieb Didrik Pinte:
> 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 ?

I cannot say without further analysis, it might also be a remains
working around a different wx bug or so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060627/fbcdebf2/attachment.bin


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)