Re: Deriving from Gtk::ListStore



On Thursday 25 November 2004 23:04, Murray Cumming wrote:

> These vague assertions are useless to us. You need to ask specific
> questions and/or mention specific lack of documentation in bugzilla:
> http://www.gtkmm.org/bugs.shtml

Okay. First time posting here :)

> I think you might be exagerating. Do you have a specific example and a
> way to improve it?

Yes, document what their purpose is. 

[from the Gtk::TreeSelection reference]

typedef sigc::slot< void,
const TreeModel::Path&,
const TreeModel::iterator& >  SlotForeachPathAndIter
  For example, void on_foreach(const Gtk::TreeModel::Path& path, const 
Gtk::TreeModel::iterator& iter);. 

This description is not really helpful. It doesn't explain what the type is 
used for and especially how it is used.

> All classes that derive from Glib::Object must have protected
> constructors but must have public create() methods that use those
> constructors. That is true for your own classes as well as the gtkmm
> classes.

Ah, so I merely have to provide a create function which returns a RefPtr to a 
newly allocated MyModel? But how is the memory managed? Does the base class 
ctor make sure my object is created in this managed storage pool?

> By the way, the treeview dnd example does this.

Argh. My bad. Thanks for the heads up :)

Regards,
Matthias



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