Hi Samuel,
Without the loop the script finishes and gives no chance to change anything.

Please advise if you can get along without a loop.

Kind regards
Jens
----------------------------------------------------------


Am 18.12.2016 15:31, schrieb Samuel Gougeon:
Hello Jens,

Why do you use a while loop? You can use only the following.

scf();
param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]);
ce = gce();
ce.thickness = 10;
m1 = uimenu('label', 'alpha=50', 'callback',"ca=gca(); ca.rotation_angles(1)=50"); m2 = uimenu('label', 'alpha=80', 'callback',"ca=gca(); ca.rotation_angles(1)=80");

HTH
Samuel

Le 18/12/2016 11:36, Jens Simon Strom a écrit :
Hi,
I try to use uimenue() in a minimal example to toggle the aspect of a 3D curve between two values - without succes.
Here is my defective script.

//BEGIN OF UNFUNCTIONAL CODE
xdel()
figure(1)
param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]); ce=gce(); ce.thickness=10;
ca=gca();
alpha=ca.rotation_angles(1);//initial alpha
   uimenu('label', 'alpha=0', 'callback',"alpha=70");
   uimenu('label', 'alpha=90', 'callback',"alpha=10");
   uimenu('label', 'break', 'callback',"break");
while 1
   xclick()  //to interrupt script, enable click on label, and restart
   ca.rotation_angles(1)=alpha;
   disp(alpha)
end
//END OF UNFUNCTIONAL CODE

Please give me a clue for a feasible route.

Kind regards
Jens




_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to