[pygtk] help with two main windows in pygtk
Prashant Shah
elite.mumbai at gmail.com
Thu Feb 21 02:44:32 WST 2008
I am making a PyGTK Application.
I am using glade. I have made two Windows (main_window, new_company)
and saved them within the same galde file and loading them using
libglade (?)
I have a button in the main_window which when clicked should show the
new_comany window (within a vbox in the main window).
I am not sure how to implement this using pygtk.
Should I make a different class and different file for each Window ?
This is going to be fairly big application.
And how to load the the new_company window within a vbox in the main_window.
This is the signal handler for the button click in the main
window(mwglade). vbox_main is the vbox. new_comp_glade is the window
for the new company.
def new_file(self,widget,data=None):
"""New data file"""
self.new_comp_glade = self.mwglade.get_widget("new_company")
self.vbox_main = self.mwglade.get_widget("vbox_main")
self.vbox_main.add(self.new_comp_glade)
This gives seg fault.
Am I doing something wrong here since this is not making sense. I know
I have messed up somewhere.
More information about the pygtk
mailing list