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

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!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

shengton
Posts: 3
Joined: Sun Oct 13, 2019 3:21 pm

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

Post by shengton » Wed Jan 01, 2020 7:27 am

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

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

Post by richmond62 » Wed Jan 01, 2020 10:51 am

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.
Last edited by richmond62 on Wed Jan 01, 2020 4:55 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

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

Post by richmond62 » Wed Jan 01, 2020 11:24 am

I'm afraid I have never heard of a Custom On.
-
LC.png
LC.png (14.28 KiB) Viewed 5984 times

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Wed Jan 01, 2020 12:32 pm

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
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

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

Post by richmond62 » Wed Jan 01, 2020 12:57 pm

Happy New Handler. 8)

shengton
Posts: 3
Joined: Sun Oct 13, 2019 3:21 pm

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

Post by shengton » Wed Jan 01, 2020 3:01 pm

Thanks Sir richmond62.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Wed Jan 01, 2020 3:39 pm

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.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Wed Jan 01, 2020 3:41 pm

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
Image

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Wed Jan 01, 2020 3:47 pm

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)

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Wed Jan 01, 2020 3:57 pm

Really? I miss ALL the fun! :twisted:
Image

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Wed Jan 01, 2020 4:24 pm

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)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

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

Post by richmond62 » Wed Jan 01, 2020 4:57 pm

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.
Last edited by richmond62 on Wed Jan 01, 2020 7:45 pm, edited 1 time in total.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Wed Jan 01, 2020 5:07 pm

Well, I still think the post I linked is a decent explanation, regardless of what followed :wink:
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

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

Post by richmond62 » Wed Jan 01, 2020 6:45 pm

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. ]

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

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

Post by jacque » Wed Jan 01, 2020 7:39 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”