Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
on mouseUp
## own message with same output
informing
## command with same output
inform
end mouseUp
on informing
answer "This is an information about 'on informing'"
end informing
command inform
answer "This is an information with command 'informing'"
end inform
adding... I have been using Livecode and its predecessors "forever" and I had never noticed that command existed. Given on has near a quarter the characters, I think I will keep using that.
Davidv wrote: Sat Feb 13, 2021 11:51 pm
They are synonyms.
adding... I have been using Livecode and its predecessors "forever" and I had never noticed that command existed. Given on has near a quarter the characters, I think I will keep using that.
They are synonyms to all intents and purposes that I know, but once upon a time, there was a suggestion that "on" be used for system messages (eg on mouseUp) and "command" be used for custom handlers.
There was an implication that maybe one day there would be a use case where this mattered beyond styling.
I don't think that use case ever raised its head so far. I did once answer a similar question thinking that you couldn't define a private handler with "on" but even that was debunked.
I am too old to use "command" for my own handlers, sticking with "on" everywhere. I am not sure I would notice any advantage to separating these, since I cannot even understand my own code ten minutes after I write it.
????
It's not visible, because it's the Commercial forum?
Well I can't easily quote the whole thread, but anyway it just repeats much of the other thread Klaus linked. I only referenced it as that was where it was pointed out that you can actually declare a handler as "private on handlerName".