I am new to Maplet programming and came across this problem while looking trying to build a simple application. Running the code results in:
"Error, (in Maplets:-Tools:-CleanUp:-SetOption) the target `("REF")("enabled")` refers to a non-existant element"
I am at a loss for why this is the case. From what I read, I am doing this right, but if anyone can see the problem... I would appreciate the help. Here's the unfinished application:
MegaPlot:=proc() plot3d(x^2-y^2,x=-5..5,y=-5..5); end;
proc() ... end;
with (Maplets[Elements]):
maplet :=
Maplet('onstartup'='Action1','reference'='Maplet1',
#Action('reference'='ParabolaPlot',Shutdown()),
#Action('reference'='ParabolaPlot',SetOption('target'='Simulation_Plot','value'=MegaPlot())),
Action('reference'='ParabolaPlot',SetOption('target'='Button1','enabled'='false')),
Plotter('background'="#FFFFFF",'continuous'='true','delay'='100','height'='400',
'reference'='Simulation_Plot','value'=plot(sin(x),x=0..10),'visible'='true','width'='600'),
Label('background'="#D6D3CE",
'caption'="Resonant Tunelling Diode Simulation",
'enabled'='true','foreground'="#000000",'reference'='Information_Text','visible'='true'),
DropDownBox('background'="#FFFFFF",'enabled'='true','foreground'="#000000",'reference'='Simulation_Selection',
'visible'='true','onchange'='ParabolaPlot',
Item('value'="Tunelling Probability"),
Item('value'="SPICE Simulation (Brown et al.)"),
Item('value'="Physics Simulation (Schulman et al.)")),
Button('background'="#D6D3CE",'caption'="Quit RTD Simulaiton",'enabled'='true','foreground'="#000000",
'onclick'='ParabolaPlot','reference'='Button1','visible'='true'),
BoxLayout('background'="#D6D3CE",'border'='false','halign'='center','inset'='5',
'reference'='BoxLayout1','valign'='center','vertical'='false','visible'='true',
BoxColumn(
BoxRow(
BoxCell('hscroll'='never','value'='Simulation_Plot','vscroll'='never')),
BoxRow('halign'='left',
BoxCell('hscroll'='never','value'='Information_Text','vscroll'='never'))),
BoxColumn(
BoxRow('valign'='top',
BoxCell('hscroll'='never','value'='Simulation_Selection','vscroll'='never')),
BoxRow('valign'='center'),
BoxRow('valign'='bottom',
BoxCell('hscroll'='never','value'='Button1','vscroll'='never')))),
Window('layout'='BoxLayout1','reference'='Window1','resizable'='true','title'="Maplet"),
Action('reference'='Action1',
RunWindow('window'='Window1'))):
Maplets[Display](maplet);