[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Carbon port: setting the creator code (patch)

From: David Reitter
Subject: Re: Carbon port: setting the creator code (patch)
Date: Sun, 10 Jul 2005 12:16:10 +0100

On 9 Jul 2005, at 17:08, Steven Tamm wrote:

Fine. You can do the same thing with osascript (although it's much more annoying).

I did that for a while, until I had a bug report from a user saying that it started Finder every time he saved a file. The AppleScript had to go through the Finder to set the creator code. Turns out that the user was running a replacement for Finder. Lesson learned: AppleScript is only a user-level API. :-(

The problem I have with it is that it will only set it to "EMAx", it can't set the file type, it will modify the creator code of already existing files, it doesn't test for UFS drives, etc.

It is meant to modify the creator code of an existing file.
I don't know if we need to check for UFS drives (works fine for me on SMB mounts; the OS takes care of creating metadata files which is not nice, but none of our business on application level). I don't know how to check for that - maybe you can add that.

Furthermore, Creator codes are being deprecated and replaced with file extension based mapping or Universal Type Identifiers. http://developer.apple.com/documentation/Carbon/Conceptual/ understanding_utis/

Yes they are and that is known, but users wanted it and I hear it plays a role in Spotlight. (I don't know anything about that in detail.)

That doesn't mean we shouldn't add the feature to "set a creator code", but it should take in the code as a parameter (a four character string or a 32-bit number).
(mac-set-creator-type "EMAx")
(mac-set-file-type "TEXT")

Yes, done. See next message.

- D

reply via email to

[Prev in Thread] Current Thread [Next in Thread]