Re: Extracting data from SimpleList

On Thu, 2005-01-06 at 20:16, Scott wrote:
Hi All,

Using the wonderful SimpleList to bypass dealing with the TreeView stuff 
is pretty handy. However, how does one get the data back out of the 
list? I've attached a small example where I am printing out the indices 
very easily, but I see no docs on accessing the data, except for 
get_row_data_from_path. How do I get the path? From my admittedly 
ignorant point of view, it would be super if there was a 
get_row_data_from_index. Anyone else think that would be useful?

you should be able to use

$slist->{data} as a normal perl array reference:
        $slist->{data}[42][0]; # 42nd row, first column
        $slist->{data}[42][1]; # 42nd row, second column
        $slist->{data}[23][3]; # 23rd row, 3rd column
if i'm not misunderstanding your question that should be all there is to
it. otherwise $slist is a Gtk2::TreeView and you can do anything with it
you would with a TreeView.


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