find_row_from_data issue in Perl::Gtk



I am having some problems with using the Gtk::CList::find_row_from_data() function
in Gtk::Perl.  Basically, the documentation and .xs files both state that it should return
an integer value (or -1 of no row found)  But in practice it returns a reference to the
CList object itself.  I have tried passing it data in several ways including:

$data = $clist->get_row_data($row);     # returns a pointer to the data
$test = $clist->find_row_from_data($data);    # returns a pointer to the CList (but shouldn't?)

test2:

$data = ${$clist->get_row_data($row)};    # returns the actual data
$test = $clist->find_row_from_data(\$data);  # still returns a pointer to the CList

test3:

$data = ${$clist->get_row_data($row));    # returns actual data
$test = $clist->find_row_from_data($data);  $ STILL returns a pointer to the CList

I realize from the documentation that test3 is wrong because find_row_from_data is
expecting to be handed a pointer, but since the first two weren't working, I figured I
would try the "wrong" way just in case.

Anyway, I am stumped on this one.  If anyone is wondering why it appears as though
I know the row, I am sucking in the data, and then trying to find the row, it is as follows:

In between these two statements are a bunch of intervening statements that change
what row is what.  Basically I am attempting to maintain a "selection" accross changes
to the CList.  (ie: There are 8 rows selected.  I suck into an array the data for each of these
8 rows.  I rebuild the list (To add new rows, remove some rows, whatever) then I want to
find the NEW rows with the corresponding data so that I can re-select them (if they still
exist)

Anyway, if anyone can help, this would be greatly appreciated...

-Steve

--------------------------------------------
Check out CSC Mail (A Gtk::Perl POP3 E-Mail Client
http://www.cyberdeck.org/cscmail
--------------------------------------------



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