You should be able to use Cocoa in an OSAX w/o trouble. You may still need to call NSApplicationLoad() if you access AppKit, but I don't think anything other than setting up an NSAutoreleasePool when you call Obj-c for calling Foundation.
Leopard did make some things easier for OSAX development (data driven install of event handlers instead of using code). That said, OS X makes a faceless background app + Scripting commands drop dead simple w/o having to do much with AppleEvents at all. Check out NSScriptCommand. I definitely agree that a scripting background app is a more robust option that's easier to develop (as a bonus). Mark Munz On Thu, Mar 12, 2009 at 12:05 PM, Matt Neuburg <m...@tidbits.com> wrote: > On Thu, 12 Mar 2009 09:41:45 -0400 (EDT), ma...@vampiresoft.com said: >>Hello, >> >>I need to rewrite an OSAX I wrote some time ago (Carbon Bundle), I wonder >>if I can use a Cocoa Bundle and use ObjC instead of the old carbon code. >>Any information? > > Marco - > > I've never written an OSAX and I don't pretend to know anything about doing > so, but I think you'd be better off asking this over on the > AppleScript-Implementors list. I presume you are acquainted with the tech > note: > > http://developer.apple.com/technotes/tn/tn1164.html > > It comes with a stub for writing an OSAX. As you can see, it looks like > Carbon entry points all the way. On the other hand, as an AppleScript user, > I'm pleading with you - no, no, not another OSAX! Just make a scriptable > executable (faceless background if need be). And then you could use Cocoa > Scripting and be all Objective-C, all the time... m. > > -- > matt neuburg, phd = m...@tidbits.com, <http://www.tidbits.com/matt/> > A fool + a tool + an autorelease pool = cool! > AppleScript: the Definitive Guide - Second Edition! > http://www.tidbits.com/matt/default.html#applescriptthings > > > > > _______________________________________________ > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/unmarked%40gmail.com > > This email sent to unmar...@gmail.com > -- Mark Munz unmarked software http://www.unmarked.com/ _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com