I have used getScript("Somescriptname").callFunction to call a function in another script which has boolean as return type.
The above call is always returning type object ,i tried explicit casting to boolean,but its throwing syntax error.
thanks & regards
getScript().callFunction will always return an object. Initially you have to store it in an object and then parse it to Boolean as shown below:
Object val = getScript("ScriptName").callFunction("FunctionName", pass arguments for the function if any);
Parse as below
Boolean giveme = Boolean.parseBoolean(val.toString());
System.out.println("Return val: "+giveme);
This should solve your problem. Please let me know if it does not..