Re: Adding AS Studio functionality to existing Cocoa app?
Re: Adding AS Studio functionality to existing Cocoa app?
- Subject: Re: Adding AS Studio functionality to existing Cocoa app?
- From: Matt Gemmell <email@hidden>
- Date: Sun, 12 May 2002 13:01:31 +0100
On 11/5/02 at 5:47 pm, bill fancher <email@hidden> wrote:
>
Click on the "Targets" tab, select your target and click on a build
>
phase. Now add an AppleScript Build Phase with the Project Menu. Drag
>
your script to the new build phase. (Make sure it has the
>
".applescript" extension.) You can debug the script by choosing "OSA
>
debugger" in the "Executables" tab.
>
> 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.
Just posting bill's off-list reply to me, in case someone else has this
problem at some point. Bill's advice above fixed the problem; the script
now kicks in as required.
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.