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.




also minos
text-label ptr click-label
Variable click#  click# off
: click-win ( -- ) screen self window new window with
    X" There have been no clicks yet" text-label new
      dup F bind click-label
    ^ S[ 1 click# +!
         click# @ 0 <# #S s" Number of clicks: " holds #>
         click-label assign ]S X" Click me" button new
    &2 vabox new panel s" Clicks" assign show endwith ;
click-win