problem with interaction of plotyy/clf/delete
Ben Abbott
bpabbott at mac.com
Mon Nov 24 10:25:26 CST 2008
On Monday, November 24, 2008, at 05:02AM, "David Bateman" <David.Bateman at motorola.com> wrote:
>Ben Abbott wrote:
>> As deleting one axis of plotyy group results in the other axis being
>> deleted, the clf() function results in an attempt to delete an axis a
>> second time.
>>
>> demo plotyy
>> clf
>>
>> error: delete: invalid graphics object (= -15.2239)
>> error: called from:
>> error: /Users/bpabbott/Development/mercurial/octave-3.1.51/scripts/
>> miscellaneous/delete.m at line 40, column 1
>> error: /Users/bpabbott/Development/mercurial/octave-3.1.51/scripts/
>> plot/clf.m at line 78, column 1
>>
>> How should this be resolved?
>>
>> Shall delete() or __go_delete__ be modified ?
>>
>> As the existence of the parent is already verified by __go_delete__ it
>> seems that it would be appropriate the check that a call back hasn't
>> deleted one of the figure's children.
>>
>Yes that might be an idea, but how do you verify that the callback did
>the deleting and its not just an invalid handle? What I'd suggest doing
>is check the validity of all handles to be deleted first in
>F__go_delete__ and then in the main loop if the handle doesn't exist
>just ignore it..
>> I took a shot at changing graphics.cc to fix the problem, but it
>> persists (my c++ skills are practically non-existent). I expect a
>> proper solution is trivial, but still beyond me :-(
>>
>Try the attached
>
>D.
Yes, that works for me.
Thanks
Ben
More information about the Bug-octave
mailing list