Task

Create a window that has:

   a label that says   "There have been no clicks yet" 
   a button that says   "click me"


Upon clicking the button with the mouse, the label should change and show the number of times the button has been clicked.




nomainwin
    button #demo.btn, "Click Me", [btnClick], UL, 20, 50
    statictext #demo.num, "There have been no clicks yet.", 20, 100, 240, 30
    open "Rosetta Task: Simple windowed application" for window as #demo
    #demo "trapclose [quit]"
    nClicks = 0
wait
 
[quit]
    close #demo
end
 
[btnClick]
    nClicks = nClicks + 1
    #demo.num "The button has been clicked ";nClicks;" times."
wait