[Changeset]: Re: cla() ?

Ben Abbott bpabbott at mac.com
Tue Oct 7 06:25:08 CDT 2008


On Oct 7, 2008, at 4:16 AM, Michael Goffioul wrote:

> On Mon, Oct 6, 2008 at 8:02 PM, John W. Eaton  
> <jwe at bevo.che.wisc.edu> wrote:
>> | diff --git a/scripts/plot/__plt_get_axis_arg__.m b/scripts/plot/ 
>> __plt_get_axis_arg__.m
>> | --- a/scripts/plot/__plt_get_axis_arg__.m
>> | +++ b/scripts/plot/__plt_get_axis_arg__.m
>> | @@ -32,8 +32,8 @@
>> |
>> |    ## Figure handles are integers, but object handles are non  
>> integer,
>> |    ## therefore ignore integer scalars.
>> | -  if (nargin > 1 && length (varargin) > 0 && ishandle  
>> (varargin{1})
>> | -      && floor(varargin{1}) != varargin{1})
>> | +  if (nargin > 1 && length (varargin) > 0 && numel(varargin{1})  
>> == 1 && ishandle (varargin{1}(1))
>> | +      && floor(varargin{1}(1)) != varargin{1}(1))
>>
>> I think a test like
>>
>> floor(varargin{1}(1)) != varargin{1}(1))
>>
>> depends too much on the current implementation of figure handles.
>> Maybe it would be better to use "! isfigure (varargin{1}(1))"  
>> instead?
>
> Testing the handle value is definitely NOT the way to go to check
> for a figure, given the fact that when IntegerHandle is off, the  
> figure
> handle won't be integer anymore. The safest way is simply to check
> the Type property of the graphics object (as isfigure does).
>
> Michael.

Hi Michael,

You are certainly correct. I was stuck in the context of Octave prior  
to the objects and properties. Thanks.

Regarding __go_delete__, I'm not proficient in c++. Can you make this  
change?

Ben


More information about the Octave-maintainers mailing list