• 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
An observation about executing AppleScripts from within Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

An observation about executing AppleScripts from within Cocoa


  • Subject: An observation about executing AppleScripts from within Cocoa
  • From: Glenn Howes <email@hidden>
  • Date: Fri, 13 Sep 2002 10:57:31 -0700

Hi,
I've been trying every which way to execute AppleScripts from within
my first Cocoa application and however I tried: using NSAppleScript, or
making Carbon calls, I always ran up against the problem of the scripts
not recognizing handlers and objects specific to my application. Well,
I think I found a solution, I now call
[NSScriptSuiteRegistry sharedScriptSuiteRegistry];
before dealing with my scripts and things work. There seems to be a
problem with my script suite getting registered dynamically when called
by a script compiled and executed from within the application's own
context as it is registered when called by external scripts. Mayhap
this is documented somewhere but I didn't see it.

Hoping to save others some frustration.

--glenn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Converting any image to PDF
  • Next by Date: Scope of [NSMutableDictionary setObject:] in an array
  • Previous by thread: Converting any image to PDF
  • Next by thread: Scope of [NSMutableDictionary setObject:] in an array
  • Index(es):
    • Date
    • Thread