can't find help on using the reset button

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, asayd

can't find help on using the reset button

Postby 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.....
chris25
 
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

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

Postby 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!
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3900
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

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

Postby shawnblc » Tue Oct 15, 2013 11:54 pm

put empty into fld "fld1"
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 311
Joined: Fri Jun 01, 2012 11:11 pm
Location: USA

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

Postby 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.
chris25
 
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

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

Postby 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
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3802
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN

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

Postby chris25 » Wed Oct 16, 2013 6:20 pm

ok, that makes things clearer Jacque. Thanks.
chris25
 
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm


Return to LiveCode University

Who is online

Users browsing this forum: No registered users and 1 guest