thought/request for ishandle()
Ben Abbott
bpabbott at mac.com
Sun Oct 12 12:43:17 CDT 2008
I've encountered several instances it the graphics m-files where
handles for figures are verified by
ishandle (h)
or
isfigure (h)
Just as often it would be useful to verify a figure represents some
other "type" of object. Checking for the other object properties would
also simplify programing.
I'd like to inquire as to opinions of modifying ishandle() to include
additional property/value pairs. For example the equivalent to
isfigure(h) would be
isfigure (h) -> ishandle (h, "type", "figure")
A check for an axes handle
ishandle (h, "type", "axes")
For a text handle
ishandle (h, "type", "text")
To find the pair of overlayed axes for plotyy where the
hax = findobj (hfig, "type", "axes");
ca = get (hfig, "currentaxes");
ax = hax (ishandle (hax, "type", "axes", "position", get (ca,
"position")));
Rather than including optional property pairs with ishandle(), perhaps
a new function should be written?
ishandle_with_prop (h, "prop1", value1, "prop2", value2, ...)
In the event of the latter, a m-file can be written (a task I'd be
happy to take on), for the former the built-in would need to be
modified.
Thoughts?
Ben
More information about the Octave-maintainers
mailing list