[gtkmm] walking trees



I writing an app that needs to search a tree, so decided to walk a tree
using foreach method. Since TreeView inherits from TreeModel i assumed I
wouldn't have to cast my TreeView object to a TreeModel object.

Gtk::TreeModel* foo;
foo = (Gtk::TreeModel*) this;
foo->foreach(SigC::slot(&myfunc));

however if I don't, it uses the foreach method which is inherited from
Container.

Firstly am I right trying to search the tree this way, and secondary, am
I would have thought it didn't make sense to override the foreach method
this way?

thanks,



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