Re: [PHP-GTK] GtkWindow::hide from GladeXML ?

[email protected] (Jake)
Newsgroups php.gtk.general
Message-ID <[email protected]>
Hello,

You assign ids to any interface objects your code needs to reference 
when creating them in the Glade designer and use get_widget() to get a 
reference.  So, if your window was named 'wndLogin' you would do:

$this->gladeGUI->get_widget('wndLogin')->hide();

-Jake Cobb

Instruct ICC wrote:
> Using http://gtk.php.net/manual/en/tutorials.helloadvanced.php
> Example 3.1. The full program
> At the end of the login function, the comments effectively say I would need to use "hide" because Gtk::main_quit() will quit the entire app.
>         //No error. You would need to hide the dialog now
>         //instead of destroying it (because when you destroy it,
>         //Gtk::main_quit() gets called) and show the main window
>         $wnd->destroy();
>
> $wnd is a GtkWindow and $wnd->hide() works if I replace $wnd->destroy().
>
> Now if I instead use a .glade file to create my GtkWindow or even a GtkDialog (which is a GtkWindow according to the hierarchy), how can I call "hide"?
>
> 	public function __construct(){
> 		$this->gladeGUI = new GladeXML(dirname(__FILE__) . '/login.glade');
> 		$this->gladeGUI->signal_autoconnect_instance($this);
> 	}
>
> 	public function onCancel(){
> 		$this->gladeGUI->hide();//PHP Fatal error:  Call to undefined method GladeXML::hide()
> 	}
>
> onCancel is called, so I know that the object oriented autoconnect worked.
> I can see that $this->gladeGUI is an object of type GladeXML, but since it displays a GtkWindow, how can I call "hide" on it?
> _________________________________________________________________
> Windows Live Hotmail and Microsoft Office Outlook – together at last.  Get it now.
> http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.