[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #35662] Using default arguments for axis prope
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #35662] Using default arguments for axis properties causes error |
Date: |
Fri, 02 Mar 2012 19:30:34 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 |
Update of bug #35662 (project octave):
Summary: set ticklength breaks plot => Using default
arguments for axis properties causes error
_______________________________________________________
Follow-up Comment #3:
Actually, this is a general problem with all the update_XXX functions which
don't just set a variable but call other update_XXX functions. I'm going to
re-title the bug to reflect that.
Here is another example
set (0, 'defaultaxesxlim', [-1 2])
gca
error: __go_axes__: operator *: nonconformant arguments (op1 is 0x0, op2 is
4x1)
The issue is that when the axis is being constructed it overrides the defaults
by calling set_XXX with the new default. This function call is done before
any other axis setup has been done and so the set_XXX functions which rely on
having an existing axis fail.
One obvious solution would be to build the axis, and then set all the
defaults. This would obviously have a lot of redundancy as an axis was set up
with multiple properties which then needed to be changed.
A second idea would be to code some signaling variable, such as building_axes,
which updating functions would check before calling the update function.
For example, Here is the code for the set_ticklength function
void set_ticklength (const octave_value& val)
{
if (! error_state)
{
if (ticklength.set (val, true))
{
update_ticklength ();
mark_modified ();
}
}
}
And here it is with the proposed change
void set_ticklength (const octave_value& val)
{
if (! error_state)
{
if (ticklength.set (val, true) && ! building_axes)
{
update_ticklength ();
mark_modified ();
}
}
}
It's still a hack, but right now Octave is broken for several properties that
one can set defaults on.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35662>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #35662] Using default arguments for axis properties causes error,
Rik <=