Graphics properties as objects
Shai Ayal
shaiay at gmail.com
Wed Jan 9 09:51:22 CST 2008
On Jan 9, 2008 5:39 PM, Michael Goffioul <michael.goffioul at gmail.com> wrote:
> I'm making progress, but I just faced a conceptual problem that might
> prevent me from putting all properties in a map and use only generic
> implementation for get/set. If I do that, I would by-pass the specific
> set_xxx/get_xxx methods (if I call "get" or "set" from the interpreted
> world), however some of them are doing specific actions. For instance,
> axes::properties::get_title create the title object; if I by-pass that method,
> then get(gca, "title") will return me nothing. So in the end, I might have
> to keep the overloaded <object>::properties::get|set implementation
> (although some simplification is possible). In that case, putting all props
> into the map makes less sense and it might just be used to store
> dynamic properties.
>
> This has no impact on the class hierarchy I defined up to now.
>
> Comments? Any better idea?
Isn't this the problem that listeners were created to solve?
This also might be solved in the way octplot did it: define the
<object>::properties::preget|postget|preset|postset functions and call
them appropriately. in this functions you can do all of the above
tasks, while keeping the code simple:
Shai
More information about the Octave-maintainers
mailing list