Button Error
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Button Error
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
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
Re: Button Error
I think the magic word your missing is "go".
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.
Code: Select all
// button code...
# button previous...
on mouseUp
go previous card
end mouseUp
Re: Button Error
Bogs,
That was it. I updated my script and it worked. Thanks for the example ZIP file. That was helpful.
Best regards
Keith
That was it. I updated my script and it worked. Thanks for the example ZIP file. That was helpful.
Best regards
Keith
Re: Button Error
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!
Best
Klaus
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!
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 9358
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Button Error
I missed that."You Can Make An App" magazine.
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/
Re: Button Error
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
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
-
- Livecode Opensource Backer
- Posts: 9358
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Button Error
That's both a funny and an informative story, Keith.
Now I have the perfect argument every time my wife suggests chucking things out.
Now I have the perfect argument every time my wife suggests chucking things out.
Re: Button Error
Could be this MacFormat Magazine?kespears wrote: ↑Sat Aug 04, 2018 10:30 pmI 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
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.
Re: Button Error
Wow Al! I think you found the sole remaining copy in existence aside from Keith's
-
- Livecode Opensource Backer
- Posts: 9358
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Button Error
Possibly . . .sole remaining copy in existence
-
Re: Button Error
Woo Richmond, where did you grab that from? Are the articles actually attached and available?
-
- Livecode Opensource Backer
- Posts: 9358
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Button Error
I thought "maturity" meant (amongst other things) learning when not to askwhere did you grab that from?
certain questions.
-
Re: Button Error
Someone told you I was mature ?!?
-
- VIP Livecode Opensource Backer
- Posts: 346
- Joined: Mon Mar 01, 2010 7:13 pm
- Location: London, UK
- Contact:
Re: Button Error
I have a copy somewhere, but as I wrote those particular tutorials I also have the original text and graphics. 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.capellan wrote: ↑Sun Aug 05, 2018 2:06 pmCould be this MacFormat Magazine?
https://www.amazon.com/Macformat-Make-E ... 3293546439
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
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist