On 2009/11/19 at 01:44 PM, Zettai Muri <zettaimuri ymail com> wrote:
Hi,
Would someone be able to point me towards a good tutorial/simple example on how to use the following method? $model->foreach ($func, $user_data=undef) * $func (subroutine) * $user_data (scalar) Call $func on each row in $model. $func gets the tree path and iter of the current row; if $func returns true, the tree ceases to be walked, and $treemodel->foreach returns. I have been googling it and turning up heaps of references to the doco and something in the archives titled: Gtk2::TreeModel::foreach callback not getting any arguments? but was hoping to get something simpler.
Not exactly sure what you want, but attached is an example for a Gtk2::ListStore's foreach. Regards, Martin Vrywaringsklousule / Disclaimer: http://www.nwu.ac.za/it/gov-man/disclaimer.html
Attachment:
model_foreach_test.pl
Description: Binary data