Re: CTree get_text (was RE:setting object data (how do I?))



On 06/27/01 Liviu BURCUSEL wrote:

($text) = $ctree->get_node_info($ctree->selection);

also works.  Is it a bug that get_node_text doesn´t ???

Now how do i get the parent node?


I'm interested in that too. I worked it around by stating
#! /usr/bin /perl
[...]
$parent = $ctree->insert_node(undef, bla, bla ...);
$leaf = $ctree->insert_node($parent, bla ...);
$leaf->{parent} = $parent;
[...]
When I want to retrieve the leaf's parent I just do
$parent = $leaf->{parent};

$node->row->parent() should work (note that it's possible to
reparent nodes and storing data in the node hashref is not reliable
and should not be used).

lupus

-- 
-----------------------------------------------------------------
lupus debian org                                     debian/rules
lupus ximian com                             Monkeys do it better




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]