My answer may be not well thought but ... from my knowledge,
problems with php-gtk you can't assign references to global vars
because this particaular declared global variable is a local
reference to the global var.
- Markus
On Sat, Sep 15, 2001 at 03:38:54PM +0200, Wolfram Kriesing wrote :
> i am using a global variable (curClass),
> which is a reference to some class,
> inside another class i want to change
> the value of this global variable, to
> "point" or refer to another class.
> but that doesnt work.
> am i doing something wrong???
>
> here my code
>
> ------------------
> class temp
> {
> function temp()
> {
> global $curClass;
> $curClass = &${$classNameY};
> }
> }
> -------------
>
> $curClass = &${classNameX};
> $tempi = new temp();
> # at this point $curClass still points
> # to the class with the name "classNameX"
> # not to "classNameY" as i would suppose
> # if i used: $curClass = $classNameY;
> # inside the class temp
> # $curClass would have the expected value
> # but with the "&${}" around it doenst work
>
> thanks 4 your help
>
> Wolfram Kriesing
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
Markus Fischer, http://guru.josefine.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0
-All your scripts are belong to Zend-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]