|Keep It Simple, Stupid|
Closing GTK child windows via codeby ryan (Pilgrim)
|on Sep 20, 2003 at 08:23 UTC||Need Help??|
ryan has asked for the wisdom of the Perl Monks concerning the following question:
I just started teaching myself using Gtk-perl, Glade and glade2perl and have a simple problem that is probably stemming from my lack of understanding of how all the modules Glade produced interact or some dilusion I have with objects/classes.
I have 2 windows. The main one loads up, then I have a button that opens the second window (modal) using window2->run (is that the correct way to do it?)
If I then close that window using the 'X' (close icon) provided by the window manager it closes and all the relevant signals get generated.
I want to be able to close this second window via code, so that particular buttons in the window could also close it, but I can't figure out how!
I'd have thought I could call the destory or hide on the window or even emit a delete_event, but it seems from the errors I can't call/do any of these thing on the second window object because I am calling them from within the object and it is therefore not blessed.
Am I using all these modules Glade kindly produced for me incorrectly? or is there a way to call these methods on one's self as it seems that is what I need to do ... and specifically how to do all that and close the window?