octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Changeset]: Re: cla() ?


From: Ben Abbott
Subject: Re: [Changeset]: Re: cla() ?
Date: Tue, 07 Oct 2008 07:25:08 -0400


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

On Mon, Oct 6, 2008 at 8:02 PM, John W. Eaton <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]