can't find help on using the reset button

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, asayd

Post Reply
chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

can't find help on using the reset button

Post by chris25 » Tue Oct 15, 2013 10:04 pm

I am trying to write the code for a reset button so that a text field becomes empty after being populated, so that user then knows to click another button. Looking under reset in the dictionary I see two commands but neither work, reset template and reset all, but I know these are wrong now. I looked under clear, but there is nothing here, I tried help, but nothing here that shows me how to write the correct syntax. So here I am again, sorry.

By the way, am on the handler placement assignment, seemed to have sailed through the last 8 scripting challenges, but I don't need a reset button, however I want to know it, it seemed a basic thing to do.

Sorry, once again, solved it. For some reason my brain was triggered by seeing the word "Empty" in a random posting. Then I went aah, just maybe.....

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: can't find help on using the reset button

Post by Simon » Tue Oct 15, 2013 10:43 pm

Hi Chris,
This is another;
put something into something

Now the question is. What would you put into a field so that it will be ummm... empty?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm
Location: USA

Re: can't find help on using the reset button

Post by shawnblc » Tue Oct 15, 2013 11:54 pm

put empty into fld "fld1"

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: can't find help on using the reset button

Post by chris25 » Wed Oct 16, 2013 8:48 am

Hi Simon, hallo shawnbic, sorry to have troubled you, figured it out as you saw from post above...Question about the Code scripter, Why does the scripting editor so often give you a "Green light and a tick with a "no problems found" message when clearly you have typed the wrong thing in, I find that more annoying than getting things wrong. I've come now to ignore it.

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

Re: can't find help on using the reset button

Post by jacque » Wed Oct 16, 2013 5:42 pm

There are two kinds of script errors (besides logic errors.) One is that the engine can't compile the script because the syntax is wrong. That aborts the compiler (no green button) and shows an error when you try to apply the script. The other type is when the content of a variable is wrong or some other action causes a problem during run time. The compiler can't anticipate those, they only happen while the script is executing. Those types of errors will allow a successful compile but error when you try to run the script.

For example:

add x to tNumber

will compile perfectly, and if x is a number it will also run perfectly. There's nothing wrong with the syntax and you can add two numbers together. But if x happens to contain a non-number, like "abc", then the engine can't add that to another number and will error.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: can't find help on using the reset button

Post by chris25 » Wed Oct 16, 2013 6:20 pm

ok, that makes things clearer Jacque. Thanks.

Post Reply

Return to “LiveCode University”