At 1:20 PM -0700 9/25/2016, Peter Bogdanoff wrote:
I see that "command" is a synonym of "on" in LC script.

Is using "command" rather than "on" a purely style preference?

I see in the old LiveCode dictionary:
The command synonym, along with the ability to declare private handlers was added in LiveCode 2.8.1

Why? Is this something to do with the message path?


Some people prefer to use "on" for handlers of built-in messages, and "command" to designate custom-written commands:

   on mouseUp
      -- do some stuff when the mouse is clicked
   end mouseUp

  command myCommandHere
     -- do my stuff
  end myCommandHere

It's just a style preference - as far as I know, it has no effect on how handlers run - but it can be convenient for differentiating between the two types of handlers.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to