Page 1 of 2

Button Error

Posted: Sat Aug 04, 2018 2:30 pm
by kespears
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

Re: Button Error

Posted: Sat Aug 04, 2018 2:55 pm
by bogs
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 252 times

Re: Button Error

Posted: Sat Aug 04, 2018 4:08 pm
by kespears
Bogs,

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

Posted: Sat Aug 04, 2018 4:23 pm
by Klaus
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

Re: Button Error

Posted: Sat Aug 04, 2018 4:24 pm
by richmond62
"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/

Re: Button Error

Posted: Sat Aug 04, 2018 8:26 pm
by bogs
Glad I could help :)

Re: Button Error

Posted: Sat Aug 04, 2018 10:30 pm
by kespears
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

Re: Button Error

Posted: Sun Aug 05, 2018 6:26 am
by richmond62
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

Re: Button Error

Posted: Sun Aug 05, 2018 2:06 pm
by capellan
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

Re: Button Error

Posted: Sun Aug 05, 2018 3:22 pm
by bogs
Wow Al! I think you found the sole remaining copy in existence aside from Keith's :wink:

Re: Button Error

Posted: Sun Aug 05, 2018 6:43 pm
by richmond62
sole remaining copy in existence
Possibly . . .
-
contents.png

Re: Button Error

Posted: Sun Aug 05, 2018 7:00 pm
by bogs
Woo Richmond, where did you grab that from? Are the articles actually attached and available?

Re: Button Error

Posted: Sun Aug 05, 2018 8:53 pm
by richmond62
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 9540 times

Re: Button Error

Posted: Sun Aug 05, 2018 9:21 pm
by bogs
Someone told you I was mature ?!? :shock:

Image

Re: Button Error

Posted: Mon Nov 12, 2018 8:36 pm
by thatkeith
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