At http://scentric.net/tutorial/sec-custom-models.html Tim-Phillip Mueller said <quote> Another case where a custom model might come in handy is when you have all your data already stored in an external tree-like structure (for example a libxml2 XML tree) and only want to display that structure. Then you could write a custom model that maps that structure to a tree model (which is probably not quite as trivial as it sounds though). </quote> Well, I gathered enough courage to see how _trivial_ it really is. I tinkered a lot with the customlist.pl trying hard to write a customtree.pl (A hierarchical tree impl of Gtk2::TreeModel) ..probably referring to an external tree hash structure as its data store ...and my head is spinning at 7200rpm now ! The task I am trying is super simple. I just want to display a small tree with one parent node and one child node. -parent -child That's it !! And to start with I am gonna hard code as much as I can. (GET_VALUE sub for example). And now I am stranded clueless with all the errors that I get and the strange behaviour of the my tree. I'm falling off the right side of my optimal-challenge zone :| If any one has code snippets related to this task, please throw it in. My (non-working) code is attached, in case some one has the time to review it and let me know how disturbing it is :) Thanks, _Ofey. __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail
Attachment:
customtree.pl
Description: customtree.pl