wxPython syntax
OKB (not okblacke)
BrenBarn at aol.com
Mon Jun 28 22:44:44 EDT 2004
David Fraser wrote:
> MenuDeclaration = """ ... """ # put the above string in here...
> MenuResource = wxResourceParser.Parse(MenuDeclaration)
>
> class FileMenu(MenuResource):
> def OnAbout(self, event):
> # put the code here
> def OnExit(self, event):
> # put the code here
This is a cool idea. I like the looks of it. One worry I have,
though, is that with the code outside the hierarchical definition
there'll still be confusion about the organization. What if you have a
menu bar as well as some other widgets, or submenus? Also, what about
things like listboxes, where you want the list elements to be determined
programmatically? Various interrelationships might exist between the
GUI's appearance and its content, which could be difficult to express if
the layout were being specified with some static text. I'm not sure how
best to handle this, but I think it's something to think about.
--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
More information about the Python-list
mailing list