ANN: AppleScriptObjC helpers for download

I’ve written a couple of Objective-C files that make life a bit easier for AppleScriptObjC coders. There is a class that you can use as a superclass, and it lets you easily do things like convert between AS dates and NSDates, convert aliases/files to NSURLs, convert NSURLs to HFS paths, make AS dates from strings, and a couple of other things. There are also categories that let you get and set AS dates in date pickers, and use HFS paths with path controls.

The files are in a test project you can download from here:

http://scriptbuilders.net/files/shanesasobjcutilities0.9.html

Any feedback is welcome (especially on the underlying code).

Enjoy…

That’s seems cool. Thanks!!
I’m curious, why the “ObjectWithFord”? What’s that stand for?
I mean, if it were me, I’d choose a Holden instead. :stuck_out_tongue:

Ford? http://mustangview.com/wp-content/uploads/2009/10/1966-ford-mustang-fastback-blue-1280x960.jpg
Holden? http://images.drive.com.au/drive_images/Editorial/2007/03/13/13HRT_m_m.jpg

The class is a subclass of NSObject, and AppleScriptObjC relies on the scripting bridge between AppleScript and Objective-C. When you come to a point on a river where there’s no bridge, sometimes you can still get across by fording the river…

Thanks Shane,

I have been learning plain vanilla Objective-C but this will help simplify a few things with my main main app which I converted to ASOC a few months back.

And now I know what NSMakeCollectable is, not to mention UCConvertLongDateTimeToCFAbsoluteTime!

And thanks for being such a foundation for this list and ASOC’s realization. I think we would be in the dark ages without you (and without the famous apple project 'examples…)

yours Rob

Thanks, and any comments on the underlying code are much appreciated. Some of that Carbon and CF stuff scares me…

Thank you, I will have a look at it!

For anyone coming in here late, these have been superseded by Myriad Helpers, available at http://www.macosxautomation.com/applescript/apps/helpers.html.

Downloaded the Myriad Helpers for Mavericks and added them to my project. I’m getting deprecations warnings for some code in NSOpenSave+MyriadHelpers, NSPathControl+MyriadHelpers, and ObjectWithFords.

Is that to be expected? A Problem?

Thanks!

Yes.

Not at this stage. The aim is to make them backwards compatible as much as possible, otherwise they will be restricted to recent OS releases.