| View previous topic :: View next topic |
| Author |
Message |
ssiwek
Joined: 15 May 2006 Posts: 20
|
Posted: Thu Jul 20, 2006 3:01 pm Post subject: hide_on_delete() |
|
|
Hi!
Does someone have a working programm with that setting?
I have some GtkWindows loaded via GladeXML.
Now I want to to set hide_on_delete.
It should hide the window instead of beeing destroyed(deleted). But it does not work for me.
App1 is the example class from gtk.php.net http://gtk.php.net/wiki/CodeSnippets/FastStartingWithGlade
| Code: |
[....]
function init(){
$this->get_widget('WIN1')->hide_on_delete();
$this->get_widget('WIN2')->hide_on_delete();
}
$a=new App1();
$a->load_glade("app_glade.glade");
$a->init();
gtk::main();
[...]
|
When I call the window more than once I do get :
PHP Fatal error: Call to a member function present() on a non-object
The other way via connecting to the signal does work....
| Code: |
function on_WIN1__delete_event(){
$aktwindow = $this->get_widget('WIN1');
$aktwindow->hide();
return true;
}
|
May be I am doing something wrong ?
Sven
P.S. I do have the latest gnope version installed. |
|
| Back to top |
|
 |
leon_pegg
Joined: 12 Jun 2006 Posts: 113 Location: hemel / UK
|
Posted: Thu Jul 20, 2006 4:23 pm Post subject: |
|
|
try this
| Code: |
[....]
$a new GladeXML("app_glade.glade");
$a->get_widget('WIN1')->hide_on_delete();
$a->get_widget('WIN2')->hide_on_delete();
gtk::main();
[...]
|
|
|
| Back to top |
|
 |
ssiwek
Joined: 15 May 2006 Posts: 20
|
Posted: Fri Jul 21, 2006 8:38 am Post subject: |
|
|
Hi!
I've tried that - but it does not work. Well at last it works the other way...
Sven
P.S.: May be it's a bug? I am very unsure about that.... |
|
| Back to top |
|
 |
|