My aim is to increase the counter and write it to the panel LABEL so that on next function execution, my var counter will take the incremented value from the widget's LABEL to start with .
What happens is that whatever value I put in the LABEL's field (ie 0), my function takes this value (0) every time it is executed. In the debug window I can read the values of booth counter - x.label 1 -0 What am I doing wrong that the x.label = counte; doesn't actually take it's incremented value 1?