I think you can already do this with gtkbuilder. something like: builder.connect_signals(self)
will use introspection to match up signals with methods. On Tue, Apr 14, 2009 at 3:02 PM, Chris Camacho <[email protected]> wrote: > I've seen a lot of code with reams of variable=xml.get_widget statements > and manually updated dictionaries of handler functions all of which is > deeply unsatisfying, inelegant and prone to error > > Taking inspiration from a number of sources I have pieced together a very > simple and short framework which integrates tightly with a .glade file > > It has the following features:- > > glade handlers are automatically mapped to functions within the handlers > class > > All most all of your code will end up in handler class functions with very > little setup code > > All widgets are mapped to a user interface object via their glade id and so > they can be accessed like this... > > ui.entry1.set_text("hello world") > > The code is commented, it should be simple to follow and in addition > techniques like __getattr__ should be useful for novice pythonites > > I'd appreciate any improvements providing they don't add extra complexity > > Hope this helps > Chris_C > > > > > _______________________________________________ > pygtk mailing list [email protected] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://faq.pygtk.org/ > -- Gerald Britton _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
