
killwindow utilizing a loop

kylinix
When i run the procedure, the pop-up window appears "window while executing KillWindow, the following error occured: Expected window name".
I am quite confused with this error, so how can i handle with this problem?
Thanks in advance for help!
function button_clear(ctrl):Buttoncontrol string ctrl variable subwinnum variable i string/g childlist string subwn, subwnname childlist=Childwindowlist("Panel") subwinnum=ItemsInList(childlist) for(i=0; i<subwinnum; i+=1) Sprintf subwn, "%d", i subwnname="Panel#G"+subwn killwindow subwnname endfor KillWaves/A/Z/F end
Finally, the statement
subwinnum=ItemsInList(childlist)-1
should be
subwinnum=ItemsInList(childlist)
September 1, 2012 at 02:33 pm - Permalink
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
September 2, 2012 at 10:41 am - Permalink
September 14, 2012 at 09:23 am - Permalink