[Scilab-users] uicontrol in a function
Chuox
chuox.bece at gmail.com
Mon Jan 6 20:22:18 CET 2014
I thinkg i have a similar problem building also my first GUI, when i exec the
code for the second windows and click on close menu (cerrar) the windows
close whit no problem, but, when i excet the second window form the first
whit the button next (siguiete) the console give me this error:
!--error 999
delete: The handle is not valid.
at line 2 of function cerrar_ventana2 called by :
t("-7b163dae:14368ed0266:-7efb");cerrar_ventana2();if exists("%oldgcbo")
then gcbo = %oldgcbo; else
while executing a callback
This is the code:
They are two windows:
in the windows one i have this:
//Boton Siguiente
Siguiente1 = uicontrol(ventana1, "Position", [350 60 130 20], ...
"Style", "pushbutton", ...
"FontSize", 11, ...
"String", gettext("Siguiente"), ...
"callback", "Siguiente()");
function Siguiente()
delete(ventana1);
exec(UbicacionInst+'Ventana 2.sce');
endfunction
in the windows two i have:
function cerrar_ventana2()
delete(ventana2);
endfunction
// Crea una ventana
ventana2 = figure("figure_name", gettext("Ventana 2"),...
"Position",[50 50 600 600],...
"BackgroundColor",[0.9 0.9 0.9],...
"Tag", "ventana2");
// Quitar los menus por defecto de SciLab
delmenu(ventana2.figure_id, gettext("&File"));
delmenu(ventana2.figure_id, gettext("&Tools"));
delmenu(ventana2.figure_id, gettext("&Edit"));
delmenu(ventana2.figure_id, gettext("&?"));
// Desactivar barra de herramientas de graficos
toolbar(ventana2.figure_id, "off");
// Menu
h1 = uimenu("parent",ventana2, "label",gettext("Archivo"));
h2 = uimenu("parent",ventana2, "label",gettext("Acerca"));
// Menu Archivo
uimenu("parent",h1,"label",gettext("Cerrar"), "callback",
"cerrar_ventana2()", "tag","cerrar_programa");
uimenu("parent",h1,"label",gettext("Cerrar SciLab"), "callback",
"cerrar_scilab();", "tag","cerrar_SciLab");
// Menu Acerca
uimenu("parent",h2, "label",gettext("Acerca"), "callback","Acerca();");
--
View this message in context: http://mailinglists.scilab.org/Scilab-users-uicontrol-in-a-function-tp4025603p4028237.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the users
mailing list