[changeset] - improve clf() compatibility
David Bateman
David.Bateman at motorola.com
Wed Oct 22 10:26:07 CDT 2008
John W. Eaton wrote:
> On 22-Oct-2008, David Bateman wrote:
>
> | 2) The correct solution is to have a means of removing callback
> | functions in the deletefcn of plotyy. So we need a dellistener function
> | that corresponds to the existing addlistener function.. I'm working on a
> | patch along these lines.
>
> The Matlab docs indicate that calling delete on the handle returned by
> addlistener should delete the object remove the listener function. It
> looks like Matlab creates a "handle class object" to represent the
> listener function. I know, we don't have "handle class objects".
> Maybe we need to fake something for now, but it seems we should at
> least use the same interface if possible instead of introducing a new
> dellistener function.
>
> jwe
>
>
In fact the problem is that "newplot" calls __go_axis__init__ which
reinitializes the axis but keeps the listeners. Deleting the axis does
correctly delete the listener functions. From that point there are two
choices, make __go_axis_init__ (ca, "replace") search all of the axis
properties for listeners are remove them.. Or alternatively, delete by
hand the callbacks elsewhere.. It probably makes sense to do both..
D.
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
More information about the Octave-maintainers
mailing list