"Command" as control structure?
Peter Bogdanoff
bogdanoff at me.com
Mon Sep 26 16:50:01 EDT 2016
Thanks Jeanne, that makes sense.
On Sep 26, 2016, at 9:53 AM, Jeanne A. E. DeVoto <revolution at jaedworks.com> wrote:
> 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list