On 19.05.2013, at 22:06, Huibert Aalbers <huib...@gmail.com> wrote:

> Hi everyone,
> 
> I have been taking a look at the Javascript bridge as a way to allow users to 
> script my Mac app. I have downloaded the CallJS sample from Apple and 
> everything seems simple enough. However, it looks like the "Run JavaScript" 
> button doesn't work, as the sentence [theWebView 
> stringByEvaluatingJavaScriptFromString:[[scriptText textStorage] string]] 
> doesn't seem to return anything.

just tried the sample. Entering 3+4 results in 7. The "return 'Hello 
JavaScript!';" 
is no valid Javascript. Calling a function: 

(function() {return 'Hello JavaScript!';})()

works though. For JavaScript-scripting: take a look at http://jstalk.org . 

Cheers, 

felix
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to