[wxPython-users] One or multiple xmlresource handlers?
Jorgen Bodde
jorgen.maillist at gmail.com
Tue Jul 3 00:07:02 PDT 2007
Ok thanks, what I am trying to subclass is the search component from
the wxPython demo. I do know it is custom python code (I have not seen
the c++ counterpart yet), so how do I go about making that as easy as
possible? Should I add that to a XrcResourceHandler or can I get away
doing this a different way?
Regards,
- Jorgen
On 7/3/07, Robin Dunn <robin at alldunn.com> wrote:
> Jorgen Bodde wrote:
> > Hi all,
> >
> > I have two custom controls I want to embed in XRC. My question is, is
> > it better to create two handler classes? Or can I use one handler
> > class (derived from xrc.XmlResourceHandler) ?
> >
> > I'm asking from a performance point of view, since every class name is
> > 'asked' to the handler if it can handle it or not..
>
> It depends. If they are closely related then I'd say use one handler,
> but if there will be a lot of "if classType == Foo:... elif classType
> == Bar:..." type of statements then it would likely be cleaner and
> simpler to have multiple handlers.
>
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org Java give you jitters? Relax with wxPython!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
More information about the wxpython-users
mailing list