[wxPython-users] A module to help load frame and dialog from XRC resource easily.

Eli Golovinsky gooli at testuff.com
Sun Jan 13 01:04:26 PST 2008


A very nicely done module!

 A few comments on how you can improve it:

Automatically binding events is an interesting concept although it
obscures the way the event functions get called a bit. I guess it
should be fine once you get used to it. I would implement
MethodNameToEvent a bit differently using split, join and maybe a bit
of regex magic to avoid looping through the characters, but that's
just a matter of personal preference.

Your __getattr__implementation in XrcFrame seems to assume there are
no other attributes in a frame other than the control it holds. That
isn't always true and the implementation should first look for the
attribute in __dict__ and only the do an XRCCTRL call.

Another note on this: in order to make this module generally useful,
you'll need to add support for handling menus and toolbars as well.

On Jan 13, 2008 8:02 AM, Gary Lee <garywlee at gmail.com> wrote:
> Dear All:
>
> I just wrote a module to help loading frame and dialog from XRC resource
> file easier. I would like to know what I can improve in this module. So, any
> suggestion are welcome.
>
>
> --
>
> Sincerely yours,
> Gary Lee
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>



-- 
Eli Golovinsky
www.testuff.com




More information about the wxpython-users mailing list