Re: "Command" as control structure?
On Sun, Sep 25, 2016 at 1:49 PM, Mike Bonner wrote: > I don't think there is a difference, though I use command for my handlers > I started doing that a while back, but have gotten rid of them. if I search for "on commandName", it catches both functions and commands . . . -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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
Re: "Command" as control structure?
Thanks Jeanne, that makes sense. On Sep 26, 2016, at 9:53 AM, Jeanne A. E. DeVoto 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@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ 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
Re: "Command" as control structure?
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
Re: "Command" as control structure?
I don't think there is a difference, though I use command for my handlers and on for rev built ins (on mouseup, on keydown etc). Just another way to aid my recognition of things in my scripts. On Sun, Sep 25, 2016 at 2:20 PM, 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? > > Peter Bogdanoff > ___ > 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 > ___ 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
"Command" as control structure?
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? Peter Bogdanoff ___ 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