Page 1 of 1

can't find help on using the reset button

Posted: Tue Oct 15, 2013 10:04 pm
by chris25
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.....

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

Posted: Tue Oct 15, 2013 10:43 pm
by Simon
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

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

Posted: Tue Oct 15, 2013 11:54 pm
by shawnblc
put empty into fld "fld1"

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

Posted: Wed Oct 16, 2013 8:48 am
by chris25
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.

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

Posted: Wed Oct 16, 2013 5:42 pm
by jacque
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.

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

Posted: Wed Oct 16, 2013 6:20 pm
by chris25
ok, that makes things clearer Jacque. Thanks.