octave-maintainers
[Top][All Lists]
Advanced

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

Re: Graphics properties as objects


From: Shai Ayal
Subject: Re: Graphics properties as objects
Date: Wed, 9 Jan 2008 17:51:22 +0200

On Jan 9, 2008 5:39 PM, Michael Goffioul <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]