Elements not showing on ggb start

DOS autori shared this question 3 years ago
Answered

When I open ggb aplet online it shows just task in second line of tasks but when I klick on first button (new task) it shows everything. Few minutes before it was first and hour ago the same problem was with tasks three and four. I tried to fix it and thought I did but every time I upload "improved" version it start to create mistake on another place. Can someone, anyone, look at the aplet and help me? I'm almost positive it's something with writing formula but I don't know what!It's driving me crazy but I cannot figure out where is the problem!


https://ggbm.at/tX7chqFK

Best Answer
photo

sorry there is a coding error.

correct is:


  1. function ggbOnInit() {
  2. ggbApplet.evalCommand("UpdateConstruction[500]")
  3. }

eval instead of Eval

.

And also in the attachment: Version B with initTime-slider (after 0.5 sec onUpdate-Script in slider) and corresponding Global-Javascript

Comments (7)

photo
1

I can't reconstruct the problem in my environment (win 10 64bit, GGB 5.0.363).

I think it's a problem of "how much need initial-time", so it's also depending of the CPU/Memory-power.

.

Maybe the attached file is OK in your environment.

This version has an addon in Global-Javascript


  1. function ggbOnInit() {
  2. ggbApplet.EvalCommand("UpdateConstruction[500]")
  3. }


If not OK increase the count to 1000 or 2000

If OK decrease the count to 10 or 1

.

Please give feedback if you have no success. I know one possibility more (but is more complex).

photo
1

Please post a screenshot of the problem.


Also you should use SetValue[] instead of "=" in scripts


  1. SetValue[prov,false]
  2. SetValue[raz,0]
  3. SetValue[zbr,0]
  4. SetValue[umn,0]
  5. SetValue[kol,0]


http://wiki.geogebra.org/en...

photo
1

Yes, I know I should. I change it but in this case it didn't help. But suggestion with ggbApplet.evalCommand helped.

Thanks for your suggestion, I'll use it im my future applets!

photo
photo
2

sorry there is a coding error.

correct is:


  1. function ggbOnInit() {
  2. ggbApplet.evalCommand("UpdateConstruction[500]")
  3. }

eval instead of Eval

.

And also in the attachment: Version B with initTime-slider (after 0.5 sec onUpdate-Script in slider) and corresponding Global-Javascript

photo
1

This worked with 1!

I still think there is some deeper probelm but it's working now as it should!


Thank you for saving the situation!

photo
1

Quote: "I still think there is some deeper probelm "

agree:

I guess: initial GGB works with timeout or wait (for synchronizing the parallel processes, respectively start to build the view in windows). And this time can be too short.

-------------------------------

Please send a screenshot of the problem. Maybe Mike can find something else.

photo
1

I cannot send screenshot because it's now working just fine :-)


If the problem occures again, I'll send screenshot!


Thank you!

photo
© 2021 International GeoGebra Institute