Button and textfield

josipk shared this question 4 years ago
Answered

So, this is the situation....

When student clicks on button Novi zadatak, a random vector appears. Students need to enter in textfields start point and end point for any vector that is equal to shown vector. And then by clicking button Provjeri that answer is checked.

But, I have a problem with it..... When I try to enter anything in first or second textfield, construcion updates, and new vector appears......

How can I stop construction from updating automaticly after entering something in textfields?

Comments (9)

photo
2

We'll check if that's a bug or not.


In the meantime, why not use drop-down lists instead of Input Boxes for that?

https://wiki.geogebra.org/e...

photo
2

(bug fixed for next release, v482)

photo
1

Dear @michael, thank you very much for your help! :) That was just the thing I needed.


I have another question for you... When ever my students click Novi zadatak (New task) button, I want drop-down list to reset and return to first element. How can I do that?

photo
1

If you prefer Input-Boxes: here is attached another workaround. In this applet F9 has no effect. Also the creating of w (red random-vector) is more easy. This code works also with release v482,

photo
1

Note:

If w=Vector(S, D) (this is the red Vector) then all the following answers are OK:

Vector(F,E), Vector(B,C), Vector(A,S) and Vector(S,D)

this is mathematically correct but maybe not what you want.

photo
1

Rami, thank you very much! :) True, there is more than one correct answer, but I need students to enter only one, doesn't matter which one. :)

photo
1

An error appears when testing the application:

If the first test is wrong, then the student corrects his input with the correct value and check the result again, then the "wrong icon" is displayed (it's wrongly). Reason: the "wrong icon" is still displayed and covers the "right icon".

Solution: hide both icons before the test-comand is executed.

Another option is to accept only the first answer.

photo
1

Regarding the resetting of the list:

The command SetValue( <listname>, 1 ) resets the dropdownlist to the first value of the list (which eventually can be a blank text)chris

photo
1

Thanks rami and ccambre. This was the first version. I will fix everything one of these day!

© 2023 International GeoGebra Institute