Re: Newbie constructor question

From: Date: Tue, 06 Mar 2001 14:14:28 +0000
Subject: Re: Newbie constructor question
References: 1  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-394@lists.php.net to get a copy of this message
On Tue, 06 Mar 2001, Barry Mitchelson wrote: > Hi, > > first of all I'd like to say that this project is very interesting :) and I will be > following it pretty closely.. but I have 1 (i guess, simple question) : > > why do the constructors have to be assigned by reference ? > > ie why > > $window = &new GtkWindow(); > > rather than > > $window = new GtkWindow(); This is due to the way underlying GtkObject's have to be stored in PHP wrappers, and also because of the way Zend handles some object stuff. If you don't assign by reference and you do several assignments, you'll find earlier ones overwritten by later ones. -Andrei * Use the source, Luke. *

« previous php.gtk (#394) next »