[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
parents are unaware of their deceased children?
From: |
Ben Abbott |
Subject: |
parents are unaware of their deceased children? |
Date: |
Thu, 09 Oct 2008 19:29:18 -0400 |
I was working on a Matlab compatible clf() and encountered this
problem ...
octave-3.1.51+:1> plot (1:10)
everything is fine here, but ...
octave-3.1.51+:2> delete (get (gcf, "children"))
octave-3.1.51+:3> plot (1:10)
error: axes: expecting argument to be a scalar axes handle
error: called from:
error: /sw/share/octave/3.1.51+/m/plot/axes.m at line 55, column 7
error: axes: expecting argument to be a scalar axes handle
error: called from:
error: /sw/share/octave/3.1.51+/m/plot/axes.m at line 55, column 7
error: /sw/share/octave/3.1.51+/m/plot/plot.m at line 187, column 5
The error results because h=gca() returns the deleted axis handle,
which results from ...
h = get (gcf (), "currentaxes");
Apparently the parent is unaware that the child has died ;-)
How should this be handled? I could modify delete.m to prune children
from their parents, but expect it is preferred to have this done at a
lower level.
Ben
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- parents are unaware of their deceased children?,
Ben Abbott <=