In Geogerbra classic object's onClick event does not trigger a run on click

Dani shared this problem 1 year ago
Not a Problem

I was doing some ggb scripting in an already existing Point object's onClick event, so to run my script I was able to just click on this point. (According to my knowledge there is no other way to run plain geogebra scripts on the site from the user interface, if there is please notify me about it thank you very much).

So I know this works in geogebra/geometry, so it maybe should in classic too.

This might relate to this post: https://help.geogebra.org/t...

Best Answer
photo

maybe:

close the script editor windows

(for me click on point works in 6.0.605 web)

Comments (6)

photo
1

If you have a problem in a specific file, please post it.

photo
1

No specific. Every new file I make in classic on the web client. Also tried on the downloaded version.

Repro:

  • put down point
  • go to its scripting page in settings
  • write something like putting down a point in the OnClick field. e.g.:"E = (1, 2)"
  • click the point nothing happens, do the same with OnUpdate field and it works on moving the point

This workflow works in Geogebra/geometry but not in classic somehow

photo
1

The command SetValue(A,(3,1)) does work Onclik in Classic. In general it's advisable to use SetValue() for existent objects.

chris

photo
2

maybe:

close the script editor windows

(for me click on point works in 6.0.605 web)

photo
1

That's right, although not avised, E=(1,2) works as well.

photo
1

Well... this suprised me quite a bit. I tried it out and rami you were right, I marked your answer best if anyone else ends up around this post.Thank you very much guys it has been really helpful.

Feature wise I would love a scripting tab with a run button though.

photo
© 2021 International GeoGebra Institute