Closing one window without exiting the app

From: Date: Thu, 12 Oct 2006 21:31:35 +0000
Subject: Closing one window without exiting the app
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7352@lists.php.net to get a copy of this message
Hi all, I am new to php gtk and I am trying to do this: 1 - I open the main window of the app, which has a menubar in it 2 - When a menu item is clicked, another widow opens with the info regarding that menu item (e.g.: to manage customers if user clicked on Customers menu item). I do this by including another .phpw file with the code to open and work on the new window. I call this window $window1. 3 - This window $window1 has its own menubar, which has a Close menu item. When users click on that menu item, I want the window to close, so only the main window of the app remains. I have tried different ways and I can't get this to work properly. I either get errors or the whole app closes. The menu item is connected to a signal like this: $menu_item->connect('activate', 'menu_processor','S'); function menu_processor($menu_item,$mnuID){ $item = $menu_item->child->get_label(); switch($mnuID){ case "S": global $window1; $window1->destroy(); break; } } Thanks for any help. Regards, Veronica

« previous php.gtk.general (#7352) next »