newyankeecodeshop/GAJavaScript — pull request #16 by b123400 (2014-02-05 09:46:02+00:00)
Title: Added support for calling GAScriptObject as a function

"callFunction" only allows a function to be called if it is a property of an object. "callAsFunction" allows functions to be called directly, which is more flexible.

One good application would be using callback to handle the no-return-value problem.
``` Objective-C
-(void)getValueWithCallback:(GAScriptObject*)callback{
[callback callAsFunctionWithArguments:@[@"Hello"]];
}
```
``` Javascript
GAJavaScript.performSelector( 'getValueWithCallback:', function(value){
// value == "Hello"
});
```