[fixed] UpdateConstruction updates twice

monica shared this question 7 years ago
Answered

In https://www.geogebra.org/st... each time when I click on "nieuwe opgave", the applet chooses a new value twice, in stead of once.

What did I do wrong?


"Behind" this button I have "on click" : UpdateConstructie[]


The double choice of the variables only happens online, not when I open the ggb locally


Any tips how to resolve this?

Comments (4)

photo
1

Hi monica,


I think it's a bug.


Workaround:

Not work with UpdateConstruction[]

instead

1)make a and b to free objects (a=0 and b=0)

2)onClick button1 (Nieuwe opgave)

SetValue[show,false]

SetValue[a, RandomElement[{-5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7}]]

SetValue[b, RandomElement[{-6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5}]]

3) delete the script in OnUpdate in button1


see also here

https://tube.geogebra.org/m...


aantal_a and aantal_b is only for control/testing (script in a and b)

I think: also a bug is : F9 change aantal_a and b (maybe the same bug)


Raymond

photo
1

Hi,


it's an old problem but there has been some progress lately:

http://jira.geogebra.org/br...


But as Raymond pointed out, in most cases it's better to avoid updating the whole construction and only update the random numbers you want to change.


Cheers,

Zbynek

photo
1

The issue should be fixed, please test.

photo
1

work now

Thank you

© 2022 International GeoGebra Institute