[Changeset]: Re: cla() ?

Ben Abbott bpabbott at mac.com
Fri Oct 10 15:58:36 CDT 2008


On Friday, October 10, 2008, at 04:22PM, "John W. Eaton" <jwe at bevo.che.wisc.edu> wrote:
[snip]
>
>I guess this gets back to the issue that Michael has brought up about
>having gh_manager::free also remove the child from its parent.
>However, my attempts to make that change did not work.  I think I'm
>missing some protection from infinite recursion on gh_manager::free.
>
>I'm having some trouble understanding how callbacks, delete,
>gh_manager::free, removing children, etc. should work, so I
>could use some help here.
>
>Thanks,
>
>jwe

I'm remain unfamiliar with the c++ side. So I won't be any help with this, but I do have a question regarding the nature of the objects' properties. Are the properties essentially structures? or are they more than that? Can their values be associated with some function?

For example, can get (gcf, "currentaxes") call a function that (1) returns the handle for the last known active axis object, provided to associated axis exists, or (2) in the event the axis does not exist look for the youngest axis/child of the figure and return that, or (3) if no child axes exist then create one?

Beyond that, I do understand why the function that deletes an object should be responsible to notifying the child's parent. However, I do not understand why that delete process should take care of things like "currentfigure" or "currentaxes". Shouldn't it be the responsibility of the parent to say who their favorite child is? ... further shouldn't the parent have the freedom to delay that determination until someone asks?

Like I said, I'm rather clueless here, so my inferences of what is being stated may be way off.

Ben




More information about the Octave-maintainers mailing list