Implementing a customtree with Gtk2::TreeModel

At 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 trying hard to write a (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. 
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 :)



Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses.


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