Question - If I somehow put everything into "m", would that use more memory somehow? Not sure how garbage collector would handle stuff.
Question - How do I even do that?
The Brightscript Language Reference says:
I don't understand that at all (almost).A BrightScript object is an roAssociativeArray which contains function pointers. When a member function is called "from" an AssociativeArray, the special variable "m" is set to point to that AssociativeArray. "m" is accessible inside the called function to access other data in the AssociativeArray object.
I thought I read somewhere that there are times you can't use "m"
The other relevant quote seems to be:
That too is a mystery to me, mostly.BrightScript does not support global variables. Except, there is one hard-coded global variable "global" that is an interface to the global BrightScript Component. The global component contains all global library functions. There is also a global context that can be accessed via the GetGlobalAA(). If in function scope and that function is not a method in an object, "m." also references the global associative array accessed with GetGlobalAA().
Question - If I use "m" for "everything", it would create an additional layer for me, such as "m.cAA.mainMenu.w" vs "cAA.mainMenu.w". Everything would have this extra layer. Would that slow things down, since there is another dictionary lookup happening, or am I totally understanding that wrong?
As you can see I feel a bit lost on this.