Re: Glib::Property and read / write settings

2020-04-10 Thread Daniel Boles via gtkmm-list
I would first make your property member a Glib::Property_ReadOnly so that errors are caught at compile time by C++. I don't know whether maybe it ignores the Glib::PARAM flags or overrides them. Yes, GLib emits ::notify with the property name as the detail, e.g. notify::my-new-prop. However, I

Re: Glib::Property and read / write settings

2020-04-10 Thread Mohith Manoj via gtkmm-list
Here is how my code basically looks. The properties are declared as public members of *CMyClass*. Hence anyone instantiating it could access it. However the property itself is initialized as a read-only property. I was expecting *CAnotherClass::SomeFunction()* to fail because it is attempting to

Re: Glib::Property and read / write settings

2020-04-09 Thread Daniel Boles via gtkmm-list
Re others writing your property: (a) how is it declared and (b) how are they accessing it. Just showing its constructor call is not enough. Re notification, use .signal_changed(). iirc you might need to make a PropertyProxy from the property and then call it on that.