[wxPython-users] One or multiple xmlresource handlers?
Robin Dunn
robin at alldunn.com
Mon Jul 2 15:48:47 PDT 2007
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!
More information about the wxpython-users
mailing list