Talking LiveCode

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9663
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Talking LiveCode

Post by dunbarx » Sat Jul 17, 2021 12:12 am

During a technical support session for our office network, I mentioned that I wrote applications. So did my tech contact, but he had never heard of LC.

So we shared my iMac, and I made a stack with his name. He was astonished. Then I dragged a few controls from a palette. Astonished. I added a few similar handlers, mouseEnter, mouseDown, etc. and moved the cursor about, watching the results appear. Astonished.

He immediately wanted to know how messages worked, and gleaned there must be a message path. So I showed him, moving a handler to the card script and adding "the target" to a handler. Guess what he was this time. He wanted to know how to layer the three buttons I made, so I showed him, and he asked how to reference those. So I showed him, both by number and by name. He wants to learn and joined the Forum right then. I offered to coach him for a few hours a week. He lives in South Africa.

Fun for me. We will see about him.

Is that all it takes? The simple creation of a stack with just a couple of gadgets, made and fiddled with live just a little? I have always wondered if the building of the calculator is already too much for a true beginner, and they will turn off, tune out and drop, er, away.

There is gold here. How to dig it up?

Craig
Last edited by dunbarx on Sat Jul 17, 2021 2:49 pm, edited 1 time in total.

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

Re: Talking LiveCode

Post by richmond62 » Sat Jul 17, 2021 8:33 am

Is that all it takes?
Sometimes.

Great story.

I think a lot of "it" depends (like most things) on people's prejudices and expectations.

A 10 year old girl who is currently attending my programming classes told me that her parents had been
told by some "programming expert" that learning LiveCode was, and I quote, "as much a waste of time as learning Scratch",
but then he got embarrassed when he saw what that girls was managing after 2 weeks.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Talking LiveCode

Post by SparkOut » Sat Jul 17, 2021 8:39 am

dunbarx wrote:
Sat Jul 17, 2021 12:12 am
Is that all it takes? The simple creation of a stack with just a couple of gadgets, made and fiddled with live just a little?
Yes!
(For a certain set of people.)
It was almost precisely that which introduced me to Runtime Revolution - a demo video of dragging out a button, coding a mouseUp handler and answering "Hello world".
And the intriguing "pass mouseUp" line introduced the message path without going into depth and scarying. (I think it might even have been by Ben.)
You might not convince experienced and hardened C++ coders that it's a serious tool for application development. You might not convince Python aficionados that there is anything in LiveCode to make it worth switching when "they've got a lib for that".
But definitely a whole slew of people interested in starting coding would find barriers removed, and other casual developers would find development advantages rapidly, as long as it is made clear that it is not just a starter tool like Scratch to step from up to "real" languages like C++. You don't grow out of LiveCode - it continues to be valid in real world application development.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Talking LiveCode

Post by SparkOut » Sat Jul 17, 2021 8:42 am

richmond62 wrote:
Sat Jul 17, 2021 8:33 am
"as much a waste of time as learning Scratch"
I mentioned that misperception too. 8)

LiveCode is a serious tool for serious development, with a lot of the starting barriers removed (whether to beginners or seasoned coders).

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

Re: Talking LiveCode

Post by richmond62 » Sat Jul 17, 2021 9:55 am

a starter tool like Scratch to step from
Wouldn't that be super, if one could step up from Scratch, but all the
children I have dealt with who have already "pissed around" with Scratch,
or even had some sorted of structured lessons, have been completely
unable to step up to either BBC BASIC or LiveCode and have to start right at
point zero just like other children who have not had the dubious benefits
of Scratch.

Xero
Posts: 152
Joined: Sat Jun 23, 2018 2:22 pm

Re: Talking LiveCode

Post by Xero » Sat Jul 17, 2021 11:52 am

As a hack programmer, there are a few issues with livecode that I see.
I come from a Macromedia Director background. When Adobe bought it out and rode it into the ground, there really wasn't anything for me to go to when I finally got back into programming. I asked around, searched around, and came up with Livecode because the language was so similar to Lingo (a verbose programming language). Being similar to what I knew, I could fill in the blanks pretty easily, but there was a few gaps that weren't filled- mainly the frame-based programming. Having programmed without frames prior to leaving Director, it was easy to get around, although I still struggle with some animations. There was also the ability to create Shockwave Flash files that was great when the web actually used them. They were tiny and easily put on a webpage back when site space was small. (Yes, I was around for the dawn of the internet, and had a bit of property in Geocities!)
I have successfully managed to create a handful of decent apps in Livecode since drinking the Kool Aid. I have written an app to manage all of my business needs- client database, accounting, invoicing, video analysis of movement, exercise database and customised program development. I have written an app for my art as well- grid creation (orthogonal and angled), Image scaling, point tracking (all used to transfer a small image on a computer to a large canvas), a desaturation tool, a colour picking tool (allowing me to work out what colour is in a section of an image. i.e. skin colours), and even a custom output file holding all of the data previously cited.
The problem I have with Livecode, if I may level some criticism out there, is in the way it's documented. Every now and then, I think, "I need to ..." with something that I am doing. So far, the only way for me to get the code, command, etc. to do what I need to do, is search and hope that someone else has done it and I can chop up the code. Knowing enough of the code, I can work out how to do this, but every now and then, I just get lost, and change bits until I get it to do what it should do. For the most part, this is how the dictionary is written too. The problem is, I need to know what to search for in order to search for it in the dictionary. And when I find something, it's presented in an example-based way, which is great as long as you're doing what the example is doing. Most parts of the code have a heck of a lot more power than the example given, and what I really want is an explanation of what is happening. I prefer to learn by the principle of the action, not the action. Imagine teaching someone how to play golf by giving them a 4 iron and showing them how to hit a ball with it. How are they going to hit with a driver or a putter- those skills are different and not necessarily transferrable without much frustration. If you teach someone the principle of hitting a ball with a club, and what each club does, the action can be applied across the board.
I am sure there are plenty of people who are amazed by Livecode and how easy it is to get started, but without a good backing to get them from beginner to intermediate- where they can do most things unaided- there will be a lot of people getting frustrated. Otherwise, Klaus will be working pretty hard to fill in all the gaps in our knowledge! (without Klaus, I'd be lost 90% of the time!)
XdM

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

Re: Talking LiveCode

Post by richmond62 » Sat Jul 17, 2021 12:20 pm

good backing to get them from beginner to intermediate
I have always found the good backing is right here on the Forums. 8)

Xero
Posts: 152
Joined: Sat Jun 23, 2018 2:22 pm

Re: Talking LiveCode

Post by Xero » Sat Jul 17, 2021 1:50 pm

I'd disagree Richmond...
GREAT backing is here! I would be lost without the brainstrust here. I can normally get the better-than-right answer within 24 hours here!
:P
XdM

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

Re: Talking LiveCode

Post by richmond62 » Sat Jul 17, 2021 4:31 pm

Nothing wrong with one's own brain up to a point,
but the voices of more experienced programmers are always useful,
and a different viewpoint is also valuable.

Personally I am a great believer in a nice, warm bath, one's favourite drink
and a spot of one's favourite music.

But, if you feel that way, why did you write the longish post re documentation?

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

Re: Talking LiveCode

Post by jacque » Sat Jul 17, 2021 4:50 pm

My nephew, who was taking an intro programming class in high school, once asked me how I'd make a button. I dragged one from the palette and dropped it on a new stack. He was amazed. I said, "let's make it do something," and and added a one-line mouseUp handler, "beep." He said, "that's it? That took us a week!"

Unfortunately he wanted to be a pilot and went off to join the Navy. But for a moment I thought I might acquire an assistant.

I've had the frustration of remembering there's a new command that does what I need but forgetting what it's called. You do need to know the word before you can search for it. Usually following the "related to" links gets me there but not always. I'm not sure how that could be improved.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Thunder
Posts: 20
Joined: Thu Mar 12, 2015 1:52 pm

Re: Talking LiveCode

Post by Thunder » Sat Jul 17, 2021 5:56 pm


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

Re: Talking LiveCode

Post by richmond62 » Sat Jul 17, 2021 6:33 pm

Search as I did, I could not find the place to sign up for the Kognition beta.

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

Re: Talking LiveCode

Post by jacque » Sat Jul 17, 2021 7:07 pm

richmond62 wrote:
Sat Jul 17, 2021 6:33 pm
Search as I did, I could not find the place to sign up for the Kognition beta.
It's not a public beta, I received an email about it. I'm not sure if everyone got that or not, it was a couple of months ago.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Talking LiveCode

Post by richmond62 » Sat Jul 17, 2021 7:38 pm

Then Thunder's posting is pretty pointless.

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Re: Talking LiveCode

Post by Bernard » Sat Jul 17, 2021 7:38 pm

Xero wrote:
Sat Jul 17, 2021 11:52 am
The problem I have with Livecode, if I may level some criticism out there, is in the way it's documented. Every now and then, I think, "I need to ..." with something that I am doing.
I think LC is really well-documented by comparison with other things. Not just the Dictionary (and a selection of relevant handlers appearing in the Script Editor for a particular object). I bought the paperback copy of the Dictionary. It's over 1000 pages long.

There's the Lessons. https://lessons.livecode.com/

There's a whole bunch of Guides - by user level, by edge cases. https://livecode.com/resources/guides/

In the IDE there's the User Guide (click Resources button). 650 pages. I've published two books in my life that together totalled 650 pages. Combined they took me 3 years full time. LC's basic documentations in User Guide and Dictionary is nearly 2000 pages of information.

There's a whole bunch of sample applications in the Resources stack.

There's 524 stacks listed in the Sample Stacks in the IDE. There's probably 100s of other stacks in this forum. So we have maybe 1000 samples available to study. When I first got started with this 20 years ago I downloaded dozens of stacks to see what could be done and how they work.

I was at a party recently and got talking to a developer of 30 years work. He'd never heard of Livecode (nor Hypercard). He'd started out on Basic and moved to C# (most professional programmers are like him - they have no interest in learning something beyond what their income demands). I've worked in more than a dozen languages. I can't think of any that was free to use and came with the amount of professional documentation/learning material that Livecode has. For many languages I'd have been lost without the half dozen or so books I bought on the language. There are a couple of books available for Livecode, but I've never needed to look at them.

Oh and I forgot. There's also a half a dozen (fairly low-cost) training courses available to buy. And at a more advanced level there's the recordings of the various LC conferences.

Whatever the deficiencies of LC the tool and LC the company, I don't think lack of information about what the product can do is one of them.
Last edited by Bernard on Sun Jul 18, 2021 8:36 am, edited 2 times in total.

Post Reply

Return to “Talking LiveCode”