Hi! I'm a PyGTK newbie.
I built a small (less than 1k lines) PyGTK-based application back in 2006 that used SQLObject and was basically a simple GUI for editing things in a MySQL database table. It was a mixed experience for me. On the one hand designing a GUI with Glade was damn great and getting things done with PyGTK was surprisingly easy even back then. (I've noticed that you've improved a lot in this department over the years! Nice!) On the other hand the whole application ended up being a single file, with all of the GUI stuff being done in a single, insanely large class. Is there a good design solution for splitting the window controller into multiple chunks? For example, I've been doing some iPhone programming recently and on the iPhone each application consists of a ton of different UIViews. Each UIView could take up either the whole screen or just a part of it. And many UIViews come with a UIViewController, which is a nice way of implementing view-specific behavior. So, for example, you could build a small form consisting of two classes, one inheriting from UIView and the other from UIViewController. Then you can easily reuse that form elsewhere, as part of a larger view, while keeping its internal logic in those two classes and only communicating with the bits outside of it when it makes sense. Is there a way of doing something like this with Glade and PyGTK? The project I'm trying to build right now will have multiple windows, but almost all of them have a shared component: a database browser panel consisting of basic controls (back, forward, current record ID, number of records, go-to-record text box and button, search box) and I'd like to put the implementation of this panel into a separate Glade file and a separate Python class, then include it as a component in different parts of the application. What would be the best way of doing that? Best, Elver [email protected] +372 5661 6933 http://elver.wordpress.com/ skype: elver.loho _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
