octave-maintainers
[Top][All Lists]
Advanced

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

Re: Graphics properties implementation


From: Michael Goffioul
Subject: Re: Graphics properties implementation
Date: Thu, 17 Jan 2008 22:13:51 +0100

On 1/17/08, Shai Ayal <address@hidden> wrote:
> This is similar to the postset checks I suggested. Maybe we should
> make it more generic and add a preset & postset functions which would
> be called from set (with the "v" modifier):
>
> void set_faces (const octave_value& v)
> {
>  if (! error_state)
>  {
>     preset ("faces", v);
>     if (! error_state)
>     {
>        faces = v;
>        postset ("faces");
>        mark_modified ();
>     }
>  }
> }
>
> this allows for further checks of the input before setting the value
> -- I'm sure it will come in handy sometime ...

I think the "preset" is overkill for the C++ implementation of core
objects. In the JHandles development, I never had to "preset"
anything, only "postset". "preset" might be useful for dynamically
built objects, but in this case listeners will be implemented in
m-code, and this will be supported.

The problem I see with trying to making this generic, even for C++
"listeners" is that it will make things slower, and I'd like to avoid that
when possible.

Michael.


reply via email to

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