Archive for October 3, 2005

Monday, October 3, 2005 [Tweets] [Favorites]

FastScripts 2.2.6

I was just trying out the new version of Daniel Jalkut’s FastScripts. It’s a great utility, and I’d buy it right away if my main applications didn’t already have their own script menus with customizable keyboard shortcuts. In fact, it might prove useful in spite of that.

But the reason for this post is to issue kudos where due. There’s a menu item in FastScripts for opening the scripts folder of the current application. Normally, this kind of command will open the folder in the Finder. FastScripts, however, opened the folder in my frontmost Path Finder window. It’s not often that software surprises me in a positive way. It would have taken a single Cocoa call for FastScripts to reveal the folder in the Finder. Instead, it checks if Path Finder is running and, if it is, sends it an Apple event to reveal the file. I like this idea so much that I’ll be implementing it in my own framework.

Aliases, Paths, and FSRefs

DrunkenBatman reports on an Apple engineer who, sadly, isn’t familiar with aliases. Preview tracks bookmarks using paths.

Meanwhile, Wil Shipley rightly doesn’t like the -applicationSupportFolder method in the CoreData stationery. But I guess someone should point out that FSRefMakePath is actually rather new, and that you can avoid fixed-sized buffers using CFURLCreateFromFSRef. Also, I do think his code should make sure the Application Support folder exists, and that it should also resolve any aliases in the resulting path.

My version of this method uses FSFindFolder (since NSApplicationSupportDirectory is only available in Tiger), and it will fall back on using a hard-coded path if FSFindFolder fails, which I’ve seen happen in the wild. It also fixes the permissions of the folder, if necessary, to make sure that I’ll be able to create files in it. Alas, it’s not one line of code.

ATPM 11.10

The October issue of ATPM is out: