Noob question - put into field without erasing text?

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

Post Reply
TubooBokBok
Posts: 19
Joined: Wed Jun 18, 2014 7:23 pm

Noob question - put into field without erasing text?

Post by TubooBokBok » Wed Jun 18, 2014 7:56 pm

Hello. I am new to Live code and have a question.

I have two buttons, when button 1 is clicked it will display 1 on a label, and likewise when button 2 is clicked it will display 2 on the label.

I want it so when you press button 1 then button 2 it will display 12 on the label, however at the moment the 2 will erase to 1 so only 2 will be displayed.

I am using the code

Code: Select all

put "1" into field Answer
How would I change this so the buttons just add the new text instead of overriding the previous text?

I hope this makes scene, and thanks in advance for any help.

Klaus
Posts: 14205
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Noob question - put into field without erasing text?

Post by Klaus » Wed Jun 18, 2014 8:29 pm

Hi TubooBokBok,

1. welcome to the forum! :D

2. You can put text BEFORE, INTO and AFTER a field (or text in a field)!
So you need to:
...
put 2 AFTER fld "answer"
## Always use QUOTES around object names!
...

You might want to check these great stack to get the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html

Best

Klaus

TubooBokBok
Posts: 19
Joined: Wed Jun 18, 2014 7:23 pm

Re: Noob question - put into field without erasing text?

Post by TubooBokBok » Wed Jun 18, 2014 8:32 pm

Thank you very much for your help :D

Post Reply