a nasty accident of API design
- From: Paul Davis <paul linuxaudiosystems com>
- To: gtkmm-list gnome org
- Subject: a nasty accident of API design
- Date: Mon, 28 Nov 2005 12:38:18 -0500
consider:
Glib::RefPtr<Gtk::TreeStore> model = ListStore::create ();
....
model->clear();
model.clear();
those last two lines both compile, but they have a completely different
effect. the first clears the model, the second "clears" the refptr.
it seems to me that it would be wise to make sure that envelope classes
like RefPtr have no methods that are likely to also exist in the wrapped
classes.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]