Posted November 11th, 2006 @ 07:11pm by Erik J. Barzeski
Occasionally, I'll download several movies from one location. I did so recently in grabbing a bunch of TextMate screencasts and a bunch of Wii videos from IGN's Wii site. Sometimes I'll keep a video, sometimes I'll throw it away when I'm done watching it.
This process would be rather simple if the proxy icon in QuickTime Player (QTP) actually worked. Instead, I watch a movie, drag its proxy icon to the trash, watch the trash highlight1, I drop, and… nothing happens. The movie should be placed into the trash. I could do trash the movies I didn't want to keep and close the windows of the ones I did (or move them out of my downloads folder), I could easily load the trash up with movies I wanted to delete and close the windows to movies I wanted to keep.
Do QTP (v7.1.3) proxy icons work for anyone else? BBEdit allowed me to put files in the trash via this method. TextMate, TextEdit, CSSEdit, and a few other Cocoa2 applications did not. Perhaps this is the expected behavior for?
Except that it isn't. Apple is abundantly clear on how a proxy icon should behave. In a Carbon dev doc titled "Handling Carbon Windows and Controls: Basic Window Manipulation," Apple says in a section called "Adding Window Proxy Icons":
If you create a document window, you should add a proxy icon to the title bar. This icon, which appears next to the window's title, serves as a proxy for the document's icon in the Finder. This proxy icon should appear and behave the way the document's icon does in the Finder.
Apple goes on to say:
Once a window has a proxy icon, the user should be able to manipulate it as if he or she were performing actions with a Finder icon for the window's file. For example, if a user drags a proxy icon to a folder, Finder window, the desktop, or another volume, the file represented by the proxy icon should be moved or copied accordingly, as if the user had dragged the file's icon in the Finder.
Document windows include a proxy icon in the title bar after a document is saved for the first time. After pressing a proxy icon for a brief period, users can manipulate it as if they were manipulating the corresponding file-system object. For example, you can attach a document to an email message by dragging its proxy icon into the email message.
Apple then provides an example illustrating the drag of a rich text file's proxy icon to an email to add an attachment.
In Cocoa applications, aliases are created at the drop locations - even across disks where a copy occurs in the Finder. When dragging proxy icons to the trash, nothing at all is done in Cocoa apps.
None of the Apple-written documents I read this evening say or suggest that an alias be created. The expected behavior remains consistent and incredibly simple: the proxy icon should behave as if the user was manipulating the document icon in the Finder.
Cocoa apps that do nothing but rely on NSDocument and NSWindow are, thus, quite broken.
- Actually it darkens, but you know what I mean - it "selects" or "activates."↩
- This distinction may be the dividing line, as QuickTime Player now links against Cocoa and behaves like a Cocoa app, including the use of aliases in drop locations via proxy icons, just like TextEdit.↩
- See this Google search.↩
- Yes, I realize some HIGs have gone the way of the dodo, but some remain very important, and I would argue that something as basic and central to the user experience as file manipulation is one of those that should remain consistent across the OS.↩