Fwd: Re: [PHP-GTK] Export GTKCtree to Array

From: Date: Mon, 28 Jul 2003 20:57:56 +0000
Subject: Fwd: Re: [PHP-GTK] Export GTKCtree to Array
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-3652@lists.php.net to get a copy of this message
The 'list' outta get this, too... -Ben ---------- Forwarded Message ---------- Subject: Re: [PHP-GTK] Export GTKCtree to Array Date: Fri, 25 Jul 2003 09:47:36 -0700 From: Benjamin Smith <bens@effortlessis.com> To: seidenberg@cf-mail.net I posted the comment on which this is based, and I've always used this as a user-defined function, not as part of a class. This function returns the children ids of a specific node in a GtkCtree as a serial array, EG: $nodes=NodeChildren($ctree, $node); I notice that your problem seems to be when using it as a *callback* function, not as part of some other code - so you may be looking in the wrong area. -Ben On Thursday 24 July 2003 05:31 am, Holger Seidenberg wrote: > I want to use this function in my class > Function NodeChildren($ctree, $node, $function='', $setparent=false) > { > static $children, $parent; > if ($setparent) > { > $children=array(); > $parent=$node; > $ctree->Post_Recursive($node, 'NodeChildren'); > } > else > { > if ($node->parent==$parent) > { > $children[]=$node; > } > } > return $children; > } > > $data=$this->nodechildren($this->arWidgets["relation_ctree"], $node, > '',true); > > if i call this function i get an error: > Warning: Unable to call ctree callback 'nodechildren' specified in xxx > > I tried $ctree->Post_Recursive($node, 'MyClass::NodeChildren'); > without succsess > > can sombody help me ?? > > MFG > Holger -------------------------------------------------------

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