[Dev] application.dialogs.Util.ok vs. wxMessageBox

Ted Leung twl at osafoundation.org
Fri Jan 6 19:08:30 PST 2006


On Jan 6, 2006, at 6:18 PM, John Anderson wrote:

> Hi:
>
> I was reviewing the flickr parcel with Ted. We noticed:
>
> application.dialogs.Util.ok(wx.GetApp().mainFrame, _(u"Flickr  
> Error"), errText)
>
> The wx.GetApp().mainFrame seemed awkward. Not only should it not  
> necessary, the Util routine should use NULL internally instead of  
> the mainFrame.
>
> However, wx already has methods for simple dialogs like Ok, Cancel,  
> etc. which take the form:
>
> wxMessageBox(errText, _(u"Flickr Error"), wx.OK)
>
> I was suggesting to Ted that that the native wx routines were about  
> as simple as any wrapper routines we could write so I would prefer  
> to get rid of the wrappers. Ted on the otherhand thought that for  
> simple parcels you shouldn't need to know any wx so the wrapper  
> routines were appropriate.

Just to be clear -- I think that for simple forms based parcels, we  
ought to be able to get by without using wx.   Lots of people who  
might want to make simple forms based parcels are going to scared off  
by having to import wx, even the tiniest bit (Python will be a  
stretch for some of them).   So I think that a small number of  
wrappers would go a long way -- but they have to be even easier than  
what's there now.

I'm not as convinced about wrapping all of wx.  In an ideal world,  
we'd abstract wx away completely, but we have to face reality.

----
Ted Leung                 Open Source Applications Foundation (OSAF)
PGP Fingerprint: 1003 7870 251F FA71 A59A  CEE3 BEBA 2B87 F5FC 4B42




More information about the Dev mailing list