Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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 Gtk.org (and at developer.gnome.org for the Gnome::* modules).

Update: spelling fix: s/There/Their/


Comment on Re: Gtk-Perl $CList-get_row_data() problems
Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://136998]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2014-04-17 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (440 votes), past polls