On Mar 22, 2009, at 8:54 PM, Michael Ash wrote:

On Sun, Mar 22, 2009 at 1:53 PM, Steve Cronin <steve_cro...@mac.com> wrote:
Adam;

I'm an ObjC guy -- I generally avoid the C stuff if possible - 'cause I have
to support my own code.

In addition to what the others have said, avoiding the C stuff if
possible but being perfectly happy to use *AppleScript*, of all
languages, is completely bizarre. C may be somewhat tedious and
unforgiving, but it doesn't come anywhere remotely close to the utter
horribleness that is AppleScript.

Indeed. Let me add that the MDItem code I posted was the 3rd iteration of that method. The first used NSAppleScript, but it took 0.5s to execute and caused a noticeable hiccup in the app. My second attempt used raw Apple events and executed in 0.01s, but would cause Finder to stall when it was called during a drag-and-drop targeting Finder (ISTR Finder's event loop was trying to process the Apple event and the drop event at the same time).

Using the MDItem C API had none of the AppleScript/Apple event problems, and was a small fraction of the code. Once you get used to working with CF, it's really no harder than Obj-C, and gives you more tools to choose from.

--
Adam

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

Reply via email to