Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jbrave
Channel Surfer

"m." is this a system keyword?

The reference manual very breifly mentions m. as follows:
The "this" pointer is "m".


Is this really true, or is m. no different from any other alphabetic character with a . after it?

The manual could really use a lot more detail about some of these things.
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
2 REPLIES 2
renojim
Community Streaming Expert

Re: "m." is this a system keyword?

m is analogous to this. Don't try to use it for any other purpose or you will have problems. It's not exactly a reserved word, but you certainly can't have any variables named 'm' since it's already being used as a variable name.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
kbenson
Visitor

Re: "m." is this a system keyword?

If in a method of a class/object, m refers to the roAssociativeArray that contains the instantiation. If in a plain function, m refers to the global object. This can be handy if you want a plain function with state.
-- GandK Labs
Check out Reversi! in the channel store!
0 Kudos