Question: Maplet window selection button

Hi, I was trying to create a window selection button in a Maplet reading the values from two radio buttons with a procedure and use the procedure output inside a runwindow command, but it´s fail. Can anyone help me? Here is the code with 3 diferent options that I try. > restart; > with(Maplets[Elements]): > with(Maplets[Elements]): > selection:=proc(test1,test2) > global procout; > if (teste1='true')then > procout='W2' > elif (teste2='true') then > procout='W3' > end if; > print(procout) > end proc: > maplet := Maplet('onstartup' = 'A1', > Window['W1']('title' = "Window Selection Button", 'layout' = 'BL0'), > BoxLayout['BL0']( > BoxColumn( > BoxRow("Select a window"), > BoxRow( > RadioButton['RB1']("1", 'value'=true, 'group'='BG1'), > RadioButton['RB2']("2", 'value'=false, 'group'='BG1'), > #Button("Window", Action(RunWindow('selection('BG1','BG2')'), CloseWindow('W1'))), > #Button("Window", Action(Evaluate('window'='selection('RB1','RB2')')),Action(RunWindow('janela'), CloseWindow('W1'))), > Button("Window", Action(Evaluate('window'='selection('RB1','RB2')'),RunWindow('janela'))) ))), Window['W2']('title'="Window 1", [ ["Window 3:",TextField['TF1']()], [Button("Window 1", Evaluate('TF1' = 'diff(TF1, x)')), Button("Exit", Shutdown(['TF1']))]]), Window['W3']('title'="Window 1", [ ["Window 2:",TextField['TF1']()], [Button("Window 2", Evaluate('TF1' = 'diff(TF1, x)')), Button("Exit", Shutdown(['TF1']))]]), Action['A1'](RunWindow('W1')), ButtonGroup['BG1']() ): > Maplets[Display](maplet): Error, (in Maplets:-Elements:-Maplet) reference janela used as the 'window' attribute of a RunWindow element is missing Error, (in Maplets:-Display) invalid input: Maplets:-Display expects its 1st argument, maplet, to be of type function, but received maplet Thanks, João Paulo Laudares
Please Wait...