I want to give users the freedom to make their own calculations.
They will put the calculations into a field…for example:
5*10/(8-5)
I then want to use eval(field) to perform the calculation in a method.
It works…but is there a way to examine first the calculation if it’s errorfree.
Becoz when I eval( ‘5*10/8-5)’ ) it encounters an error (missing a ‘(’ )
and the method quits.
Ok…I figured it out…
I was running Servoy in Debug-mode…
When running is Debug-mode…the try-catch thing doesn’t work
When you run normally…it works like a charm…