Adding AS Studio functionality to existing Cocoa app?
Adding AS Studio functionality to existing Cocoa app?
- Subject: Adding AS Studio functionality to existing Cocoa app?
- From: Matt Gemmell <email@hidden>
- Date: Sun, 12 May 2002 01:31:08 +0100
Hi all,
I must be doing something stupid. I have a Cocoa document-based app, and
there's a single function which I need to implement using AppleScript (I
need to ask BBEdit for one of its preference settings).
I went into IB, enabled the onclick action for the button which triggers
this function in the AppleScript pane of the Inspector, created a new
script with the appropriate handler, and wrote the appropriate AS code.
In PB, I linked the AppleScriptKit framework, and I even added the
NSAppleScriptEnabled YES key to the Info.plist (in Expert settings in
the Build settings).
The app compiles and runs just fine, but the button in question doesn't
do anything. I can't seem to get it to do anything AS Studio-related.
I've opened some of the AS Studio example apps, and the only difference
I notice is in the "File & Build Phases" tab of their target settings;
they have a specific "AppleScripts" section, whereas in my Cocoa app my
AppleScript file is just included in the Bundle Resources section.
Surely you don't have to create an app using one of the AS Studio
templates in order to have AS Studio functionality? I can't imagine that
being the case.
I've been banging my head against this for two hours, and I'm admitting
defeat - *please* help me to work out what I'm doing wrong (or what I'm
not doing that I should be doing, or whatever). This is as frustrated as
I've ever been when developing on OS X. Help!
Best,
-Matt
--
Matt Gemmell
Scotland Software
<
http://www.scotlandsoftware.com/>
_______________________________________________
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.