"Command" as control structure?
Jeanne A. E. DeVoto
revolution at jaedworks.com
Mon Sep 26 12:53:50 EDT 2016
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.
More information about the use-livecode
mailing list