Page 1 of 2

What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 7:27 am
by shengton
Hello LC Experts,

Newbie here from the Philippines. Is any body here could explain to me, what is the difference between Custom Command, Custom Function, and Custom On?

I'm confused about the three(3) Custom Handlers on how/when to use it?

Hoping to read your answers LC Experts.

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 10:51 am
by richmond62
The difference between a Custom Function and a Custom Command is just about
the same as the difference between a Function and a Command.

A Custom Command is explained here: http://lessons.livecode.com/m/4603/l/56 ... g-a-button

Custom Functions here: http://livecode.byu.edu/functions/functions.php

If you look in the Help section of the LIveCode interface both functions and commands are clearly explained.

Normally when a command is used it is called by its name:

put XX into ZZZ where put is the command

A function is normally called using a command

put cheeseBits(firstVALUE, secondVALUE) into ZZZ

where put is the command, and cheeseBits is the custom function that you have defined elsewhere.

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 11:24 am
by richmond62
I'm afraid I have never heard of a Custom On.
-
LC.png
LC.png (14.28 KiB) Viewed 8005 times

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 12:32 pm
by bogs
richmond62 wrote:
Wed Jan 01, 2020 11:24 am
I'm afraid I have never heard of a Custom On.
Substitute "Handler" for "On" :wink:

Happy New Year all :D

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 12:57 pm
by richmond62
Happy New Handler. 8)

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 3:01 pm
by shengton
Thanks Sir richmond62.

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 3:39 pm
by Klaus
A couple of years ago, LC announced that they might change something in the language and users should use
-> command MyHandler
instead of
-> on MyHandler
so the engine could differ between build-in commands like "ON mouseup" from user created (= custom) handlers.
The above mentioned change did not happen however... 8)

A custom function is everything that WE create in contrary to the build-in functions like SUM() etc.

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 3:41 pm
by bogs
You may also find this essay by Jacque to be helpful in further understanding custom handlers, functions, and such.

I had forgotten to include it in my previous reply.

*Edit - Just came across this also very well explained post right here in the forum :D

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 3:47 pm
by Klaus
bogs wrote:
Wed Jan 01, 2020 3:41 pm
*Edit - Just came across this also very well explained post right here in the forum :D
Oh, Dr. Marielle Lange, a very dark chapter in the LC history! 8)

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 3:57 pm
by bogs
Really? I miss ALL the fun! :twisted:

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 4:24 pm
by Klaus
Oui, mon ami! :D

Basically (what I learned from the LC mailing list at that time, this was of course not completely discussed in public)
she wanted to (or even did?) sue LC for not keeping the promises the marketing departement made. 8)

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 4:57 pm
by richmond62
This person . . ,

Hired me to do something about converting LiveCode stacks into HTML (2001-2) and did not like
what I did. Then apologised and said she was seeing a specialist about "her emotional problems."

I still have the version of Revolution DreamCard that she bought me for my work.

Obviously something rather complicated and sad going on there.

I do hope she is all a bit happier now.

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 5:07 pm
by bogs
Well, I still think the post I linked is a decent explanation, regardless of what followed :wink:

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 6:45 pm
by richmond62
Well, I still think the post I linked is a decent explanation
Aye, well, if inventing nonce-vocables is your idea of "a decent explanation."

----

Let's take a glisk:

"When you give a command, you don't expect the person to discuss your instructions, only to obtemperate (promptly obey)." [ My high lighting. ]

What a stramash we'd aa hae were we to toss up war ain, seemingly, random vocables when it suited us. 8)

"I don't know what you mean by 'glory,' " Alice said.
Humpty Dumpty smiled contemptuously. "Of course you don't—till I tell you. I meant 'there's a nice knock-down argument for you!' "
"But 'glory' doesn't mean 'a nice knock-down argument'," Alice objected.
"When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean—neither more nor less."
"The question is," said Alice, "whether you can make words mean so many different things."

Alice Through the Looking Glass; Lewis Carroll. [ My high lighting. ]

Re: What's the difference between Custom Command, Custom Function, and Custom On?

Posted: Wed Jan 01, 2020 7:39 pm
by jacque
She Who Must Not Be Named scans (or used to scan) all public LC conversations looking for references to herself. I made that mistake once after she was unceremoniously dumped from participation and received a threatening email with legal implications, which of course she could not follow through on. I have since stopped doing that, she is best left alone.

If she is still bothering with us after all these years you can probably expect retaliation to this thread.