When a set of children have not the same number of sub-children, vectorized insertion or extraction fails
@sgougeon)
Reported by Samuel GOUGEON (BUG DESCRIPTION:
----------------
When a set of children have not the same number of sub-children, vectorized insertion or extraction fails.
Example:
n2 = -1000:200:1000;
nS = -1000:200:1000;
[N2,NS] = ndgrid(n2, nS);
N1 = 2.6*N2 + (3.6)*NS;
xdel();
contour(n2_,nS_,N1/100,[-60:10:60])
ca = gca();
ca.children
ca.children(1)
ca.children(2)
ca.children.children
// Setting the same color to all level curves:
ca.children.children(2:2:$).foreground = color("red")
-----------
--> ca.children
ans =
13 by 1 matrix of handles:
==========================
Compound
Compound
Compound
Compound
Compound
Compound
Compound
Compound
Compound
Compound
Compound
Compound
Compound
--> ca.children(1)
ans =
Handle of type "Compound" with properties:
==========================================
parent: Axes
children: "Polyline" // <<<<<<<< only 1 child
visible = "on"
user_data = []
tag = ""
--> ca.children(2)
ans =
Handle of type "Compound" with properties:
==========================================
parent: Axes
children: ["Polyline","Text"] // <<<<<<<<<< 2 children
visible = "on"
user_data = []
tag = ""
--> ca.children.children
at line 7 of function %h_get ( SCI\modules\graphics\macros\%h_get.sci line 19 )
in builtin get
at line 4 of function %h_e ( SCI\modules\graphics\macros\%h_e.sci line 16 )
inconsistent row/column dimensions
--> ca.children.children(2:2:$)
at line 7 of function %h_get ( SCI\modules\graphics\macros\%h_get.sci line 19 )
in builtin get
at line 4 of function %h_e ( SCI\modules\graphics\macros\%h_e.sci line 16 )
inconsistent row/column dimensions
ERROR LOG:
----------
See hereabove
HOW TO REPRODUCE THE BUG:
-------------------------
n2 = -1000:200:1000;
nS = -1000:200:1000;
[N2,NS] = ndgrid(n2, nS);
N1 = 2.6*N2 + (3.6)*NS;
xdel();
contour(n2_,nS_,N1/100,[-60:10:60])
ca = gca();
ca.children.children
ca.children.children(2:2:$).foreground
ca.children.children(2:2:$).foreground = color("red")
OTHER INFORMATION:
------------------
Bug found when answering to https://www.mail-archive.com/users@lists.scilab.org/msg06034.html
Edited by Vincent COUVERT