After reading the intro to Monkey C, There are some concepets I'm still not quite getting. for example
It says public variables are visible to other classes, but how do you access and modify them?
Say I declare a class variable under TigerView ( that extends Watch.UIView ) var testvariable; Then under function initialize() I give it a value
testvariable = 99; and then I System.Print (testvariable),Then change the variable and System.print(testvariable)
it shows correctly the value I originally set followed immediately by the new value;
If I go into another class like behaviourdelegate, How can I System.print the testvariable value from TigerView class?, and how can I modify the value of the variable ?
If I try to System print from behaviour delegate, it just returns a NULL response?
What is the meaning of the function invocation syntax, when sometimes it is written as DoSomething(), and other times it is DoSomething(somethingInHere).
EG onUpdate() vs onUpdate(dc) , or function initialize() { List variable values } or funciton initialize(variable in here){List variable values} are they the same? what difference does it make?
What is the difference between a function and a method.....I read that they were 1 and the same, then I read that functions can be used anywhere while programming but methods cannot?
Does the below thing mean that method will provide a value once methodName has first given it an answer?
And does that thing represent the ability for any Method in Toybox to give the callback? or is it only methods in the CLASS where the function has been written?
method(methodName) ⇒ Toybox::Lang::Method
What difference does it make, which Class I Declare my variables in? How do I choose which one is the right one to do it?
Thanks!