Tom, you rule. It works.
I figured out my problem with my other script too.
I had written get and set accessor methods in my class. I discovered that
attempting to pass the reference to the set method in the class constructor
DOES NOT work, while setting it directly in the class constructor DOES work!
// DOES NOT WORK
class parentClass {
var $a;
function parentClass(&$_a){
$this->setA(&$_a);
}
function setA(&$_a){
$this->a =& $_a;
}
}
// DOES WORK
class parentClass {
var $a;
function parentClass(&$xa){
$this->a =& $xa;
}
// doesn't work from constructor
function setA(&$_a){
$this->a =& $_a;
}
}
Hope this helps someone else out there.
-Geoff
-----Original Message-----
From: Tom Rogers [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 27, 2002 7:56 AM
Cc: [EMAIL PROTECTED]
//[snip]
function parentClass($_x, &$_child) { //<<<<<<<<<<<<<
//[snip]
$this->child =& $_child; //<<<<<<<<<<
//[snip]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php