Re: Bug In CTree ?



On 11/22/01 Pedro Caria wrote:
on one machine I get something like this (by clicking repeatedly on a
node)
Gtk::CTreeNode=HASH(0x9397314)
Gtk::CTreeNode=HASH(0x9397314)
Gtk::CTreeNode=HASH(0x9397314)
Gtk::CTreeNode=HASH(0x9397314)

that is, always the same node...
on another machine I get this
Gtk::CTreeNode=HASH(0x93972fc)
Gtk::CTreeNode=HASH(0x93973b0)
Gtk::CTreeNode=HASH(0x9397314)
and the process memory starts to rise (slowly)

now I need the first behavior because I saved adicional info inside the
Nodes (when I first create them) and of course now each time I click
them it just gives me a bogus node...

Do not ever store data inside a Gtk::CTreeNode, it's not a Gtk::Object,
it can't be properly reference-counted, it may not even be a hash
reference in the future.
You can use:
        $ctree->node_set_row_data ($node, $data);
        $ctree->node_get_row_data ($node);
(where $data is a reference).
Or store some (textual) info in an hidden column.

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]