Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Gtk-Perl $CList-get_row_data() problems

by count0 (Friar)
on Jan 08, 2002 at 03:48 UTC ( #136998=note: print w/replies, xml ) Need Help??

in reply to Gtk-Perl $CList-get_row_data() problems

Without knowing what's in %dades, it's hard to say.. But here's a quick rundown on how to use set_row_data() and get_row_data().

These two functions are provided as a way to attach arbitrary data to a CList row.
Their basic use is:
$clist_obj->set_row_data ($row_number, $data_reference); $data_reference = $clist_obj->get_row_data ($row_number);

It's very important to note that the user data must be a reference. It can be any type of reference, hower.

If this little tidbit doesn't help you fix the error, just post a reply with more of the surrounding code.

On a somewhat side note, I realize parts of the Gtk+ and Gnome (and the Gdk, though this shouldn't be much needed) documents for the Perl bindings are rather unclear, or incomplete.... I'm currently (among other things) writing some extended docs. If you find any other parts that are unclear, or incomplete.. please let me know and I'll add that to my TO-DOC list ;)

In the meantime, if you know C, don't hesitate to look at the tutorial and API documentation at (and at for the Gnome::* modules).

Update: spelling fix: s/There/Their/

Replies are listed 'Best First'.
Re: Re: Gtk-Perl $CList-get_row_data() problems (solved)
by Lasker (Beadle) on Jan 08, 2002 at 04:24 UTC

    Hey, you got it! Neither $tmp nor $valor were, of course, a reference (in fact, I insisted on evaluating and dereferencing $dades to get the scalar value... poor fool of me ;P). I did check the C Gtk manual, and saw that in C a pointer had to be passed to the function, but I simply ignored it.

    By set_row_data()ing the whole big arrayref $dades this stuff seems to work.

    while (1) { print "Many thanks dude! :-))"; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://136998]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2017-06-25 16:12 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (568 votes). Check out past polls.