[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #41629] "set (h)" should not return read only
[Octave-bug-tracker] [bug #41629] "set (h)" should not return read only properties
Mon, 17 Mar 2014 01:27:14 +0000
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
Follow-up Comment #3, bug #41629 (project octave):
I applied the two patches together and they appear to work. I'm uploading the
consolidated changeset so you can see the final result.
One thing I wondered about was the dispatch table in the is_readonly function.
Is there any way to get C++ to do this for us? Below is a small portion of
the dispatch table.
is_readonly (const graphics_object obj, const std::string& pname)
bool retval = false;
if (obj.isa ("root_figure"))
retval = root_figure::properties::has_readonly_property (pname);
else if (obj.isa ("figure"))
retval = figure::properties::has_readonly_property (pname)
It seems like there ought to be a way to call something like the following
retval = obj.has_readonly_property (pname);
because the object already knows what it is and has an overloaded instance of
the has_readonly_property method depending on what kind of object it is. The
syntax above doesn't work though.
Additional Item Attachment:
File name: ro_props.cset Size:8 KB
Reply to this item at:
Message sent via/by Savannah
- [Octave-bug-tracker] [bug #41629] "set (h)" should not return read only properties,