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

Andi Vajda vajda at osafoundation.org
Fri Jan 6 18:21:02 PST 2006


On Fri, 6 Jan 2006, 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.
>
> So I thought I'd ask for opinions on which option other people prefer.

I think that exposing wx as a public API is a bad idea, it should just be an 
implementation detail.

Andi..


More information about the Dev mailing list