Re: Gtk2::TreeModel - foreach





Not exactly sure what you want, but attached is an example for a 
Gtk2::ListStore's foreach.

Where does the $user_data (scalar) part of the method come into play?
Is it possible to get an extended example that shows how this is used?

$model->foreach(
    sub {
        my($model,$path,$iter) = @_;
        my($item)              = $model->get($iter, 0);

        print "$item\n";

        # return TRUE to end
        return FALSE;
    }, $user_data <----------------------- ???
);

Is this data within the ListStore or some other data passed to the method?  How does the method act on this 
data?

Again thanks for the help.


      __________________________________________________________________________________
Win 1 of 4 Sony home entertainment packs thanks to Yahoo!7.
Enter now: http://au.docs.yahoo.com/homepageset/




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