setCoordSystem does not work in ggbOnInit()
Hi GeoGebra friends,
I'm a teacher and am developing an exercise file for students; it's about finding the equations of randomly created linear functions.
When the student clicks the "Next Exercise" button, I create a new linear function and change the bounds of the coordinate system to fitting values by using the command
in the button skript. (Before, I do some calculations to get good values for the bounds, but that's irrelevant here). This works really fine.
Since by saving the current coordinate system is also saved, I'm trying to reset the bounds of the coordinate system when the GeoGebra file is reloaded. Therefore I put the command
in the ggbOnInit() routine.
But for some reason the routine is not working in the ggbOnInit() routine. Why is this? How can I reset the coordinate system on startup? It's really annoying :(
I'd be glad to get some help.