Best practice

From: Date: Fri, 29 Apr 2005 08:52:34 +0000
Subject: Best practice
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5795@lists.php.net to get a copy of this message
Hi all, Here's a snippet of the code I have, it's been made a little easier just for the example: class phpDiveLogger extends GtkWindow { protected $vbox1; function __construct () { parent::__construct (); $this->set_title ("DiveLogger v0.5-dev"); $this->set_default_size (gdk::screen_width (), gdk::screen_height ()); $this->connect_object ("destroy", array ("gtk", "main_quit")); $this->vbox1 = &new GtkVBox (); $this->add ($this->vbox1); $button = &new GtkButton ("Boe"); $this->vbox1->pack_start ($button); } } This is the line I'm having trouble with: $this->vbox1->pack_start ($button); What's best practice to solve this? Should I do something like this: $vbox1 = &$this->vbox1; Thanks in advance! Sander Knopper

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