• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CallJS sample
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CallJS sample


  • Subject: Re: CallJS sample
  • From: Felix Franz <email@hidden>
  • Date: Sun, 19 May 2013 22:31:26 +0200

On 19.05.2013, at 22:06, Huibert Aalbers <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >CallJS sample (From: Huibert Aalbers <email@hidden>)

  • Prev by Date: Lazy Fetching - Bug?
  • Next by Date: Sandboxing and ABAddressBook
  • Previous by thread: CallJS sample
  • Next by thread: Lazy Fetching - Bug?
  • Index(es):
    • Date
    • Thread