Gtk2::TreeModel::foreach callback not getting any arguments?



Two questions, kinda related:

First: I'm browsing a rather large tree which could have a lot of
images, so I want to be able to load and unload images as the tree
gets browsed. I'm doing a:

    $treestore->foreach($iterator, forEach, ['populate', $self->{-nodemapping}]);

on the expand message, but although my "forEach" callback is getting
called, it isn't getting any arguments. Any hints?


Which leads me to: Is there a better way to store metadata in a
TreeStore than just put it in an unused column? I'm using a string
right now, which means that when I get it back out it's unblessed, and
I have to run it back through a hash to figure out which object it was
originally associated with.

Dan
(Learning fast, but still a whining newbie.)




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