I heard about that. for now, itts my only soloution to parse a simple
formular. Or should i compose a JSNI like the following:
public static native boolean evalBoolean(String arg) /*-{
var i = arg;
return i;
}-*/;
--
You received this message because you
That will just try to convert a String to a boolean which will either be
coerced to 1 (if not null or 0) or perhaps throw an error.
You say that your formulae are simple. Perhaps you can write a simple
tokenizer/lexer.
Joe
--
You received this message because you are subscribed to the
Hi there,
i'm using a simple JSNI Function:
public static native boolean evalBoolean(String arg) /*-{
return eval(arg);
}-*/;
public static native double evalCalculation(String arg) /*-{
return eval(arg);
}-*/;
in development mode
Please consider not using eval(). It is the source of a great many bugs and
opens up many security holes.
For example, now you must be sure that your string being evaluated does not
have any variable name conflicts with GWT. Since the GWT compiler minimizes
variable names and methods to single