Button Error

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

kespears
Posts: 27
Joined: Sat Aug 04, 2018 2:07 pm

Button Error

Post by kespears » Sat Aug 04, 2018 2:30 pm

I'm writing my first LiveCode app. It's a card data base found in the "You Can Make An App" magazine. The instructions guides me through adding "New Card", no error. When updating the code for the previous and next button using "<" and ">" as the name and label fields respectively in the Inspector and I get Errors.

Previous Button
Code:
on mouseUp
previous card
end mouseUp

Error says: "button "<": compilation error at line 2 (Expression: missing factor), char 4.

Next Button
Code:
on mouseUp
next card
end mouseUp

Error says: button ">": compilation error at line 2 (next: token is not 'repeat') near "card", char 4
Attachments
Button Previous - Screen Shot 2018-08-04 at 7.59.36 AM.png
Button Next - Screen Shot 2018-08-04 at 8.03.44 AM.png

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

Re: Button Error

Post by bogs » Sat Aug 04, 2018 2:55 pm

I think the magic word your missing is "go".

Code: Select all

// button code...
# button previous...
on mouseUp
   go previous card
end mouseUp
Here is a simple demo stack, I put the field and both buttons into a group, then set the group as shared (so it appears on every card). The text box will tell you which card your on.
card_demo.zip
(762 Bytes) Downloaded 185 times
Image

kespears
Posts: 27
Joined: Sat Aug 04, 2018 2:07 pm

Re: Button Error

Post by kespears » Sat Aug 04, 2018 4:08 pm

Bogs,

That was it. I updated my script and it worked. Thanks for the example ZIP file. That was helpful.

Best regards
Keith

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

Re: Button Error

Post by Klaus » Sat Aug 04, 2018 4:23 pm

Hi Keith,

welcome to the forum!

I highly recommend these stack to learn the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html

And of course this wonderful forum! :D


Best

Klaus

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

Re: Button Error

Post by richmond62 » Sat Aug 04, 2018 4:24 pm

"You Can Make An App" magazine.
I missed that. :cry:

I'd be most grateful if you could point me to where I can find that.

Oh, and while I'm "here": if you don't "feel all funny" about Facebook
you can go to this place and get angry at my stacks:

https://www.facebook.com/RMLCclasses/

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

Re: Button Error

Post by bogs » Sat Aug 04, 2018 8:26 pm

Glad I could help :)
Image

kespears
Posts: 27
Joined: Sat Aug 04, 2018 2:07 pm

Re: Button Error

Post by kespears » Sat Aug 04, 2018 10:30 pm

richmond62,

I purchased the "You Can Make An App" magazine in 2014 from a local computer store in St. Louis. It was the 2nd Edition updated for 2014. Candidly it sat on my book shelf until a week ago and then I found several tutorials on LiveCode and I'm sold!

Magazine Info:
Quay House, The Ambury, Bath, BA1 1UA, UK
Phone +44 (0) 1225 442244

Hope this helps.
Keith

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

Re: Button Error

Post by richmond62 » Sun Aug 05, 2018 6:26 am

That's both a funny and an informative story, Keith.

Now I have the perfect argument every time my wife suggests chucking things out. :D

capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: Button Error

Post by capellan » Sun Aug 05, 2018 2:06 pm

kespears wrote:
Sat Aug 04, 2018 10:30 pm
I purchased the "You Can Make An App" magazine in 2014 from a local computer store in St. Louis. It was the 2nd Edition updated for 2014. Candidly it sat on my book shelf until a week ago and then I found several tutorials on LiveCode and I'm sold!

Magazine Info:
Quay House, The Ambury, Bath, BA1 1UA, UK
Phone +44 (0) 1225 442244
Could be this MacFormat Magazine?
https://www.amazon.com/Macformat-Make-E ... 3293546439

Al
Last edited by capellan on Sun Aug 05, 2018 3:24 pm, edited 1 time in total.

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

Re: Button Error

Post by bogs » Sun Aug 05, 2018 3:22 pm

Wow Al! I think you found the sole remaining copy in existence aside from Keith's :wink:
Image

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

Re: Button Error

Post by richmond62 » Sun Aug 05, 2018 6:43 pm

sole remaining copy in existence
Possibly . . .
-
contents.png

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

Re: Button Error

Post by bogs » Sun Aug 05, 2018 7:00 pm

Woo Richmond, where did you grab that from? Are the articles actually attached and available?
Image

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

Re: Button Error

Post by richmond62 » Sun Aug 05, 2018 8:53 pm

where did you grab that from?
I thought "maturity" meant (amongst other things) learning when not to ask
certain questions. 8)
-
p.jpg
p.jpg (8.6 KiB) Viewed 7596 times

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

Re: Button Error

Post by bogs » Sun Aug 05, 2018 9:21 pm

Someone told you I was mature ?!? :shock:

Image
Image

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Button Error

Post by thatkeith » Mon Nov 12, 2018 8:36 pm

kespears wrote:
Sat Aug 04, 2018 10:30 pm
I purchased the "You Can Make An App" magazine in 2014 from a local computer store in St. Louis.
capellan wrote:
Sun Aug 05, 2018 2:06 pm
Could be this MacFormat Magazine?
https://www.amazon.com/Macformat-Make-E ... 3293546439
I have a copy somewhere, but as I wrote those particular tutorials I also have the original text and graphics. 8) It was done for MacFormat magazine as a series across a number of months, but Future Publishing is very good at reusing content so I knew it was also going to be collated in a dedicated app creation publication too.

Back then the central Future CMS required contributors to paste text into specific fields, trying to streamline the process of then going from database to template-driven publication. But my tutorials broke the system thanks to having to mark up the chunks of text that were to be formatted as code! Well, not full-on *broke* but it didn't work. So I ended up laying out the pages in InDesign with the MacFormat production templates, agreeing a code style, and typesetting the code as well as the regular text. (By stylesheet; I'm no idiot!) This meant that I could fine-tune the way all the text (both regular and code) flowed and fitted across the pages.

It's probably impossible to find a printed copy now, but if anyone really wants them and has an iPad, the MacFormat iPad app is the typical library-style digital mag thing and it offers downloads of special publications such as that Make An App one. At least I *think* it still goes back to 2014.

I'd probably make some of the 'chapters' different now, but I do think they're not too bad at getting someone up and running. I've used them with some of my students. Keith, I'm absolutely delighted they helped inspire you! And also hi, fellow Keith. :)

Keith
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”