http://qs321.pair.com?node_id=700007

renegadex has asked for the wisdom of the Perl Monks concerning the following question:

what is the difference between a Canvas Item and a Canvas Item Model?

Replies are listed 'Best First'.
Re: GooCanvas Model
by zentara (Archbishop) on Jul 31, 2008 at 15:00 UTC
    Hi, I wondered about this myself. I couldn't see much of a difference in the demo code, in the way it worked. My first thought was that a model was a way to make clones... like make a model then clone it to make new items, but I don't think that is it.

    If you look at the docs that come with the Goo c library, the Model class is designed to make subclassing of items and designing your own items simpler. I don't grasp it all yet, but it seems that the various Model classes are the base classes of the various item classes (which are more complex than the base model). There are subtle differences in the inheritance heirarchy between the model and the item, and that probably make it easier to use it as a base class.


    I'm not really a human, but I play one on earth Remember How Lucky You Are