File Imprecations

There’s no dedicated widget in Cocoa for specifying and displaying a file.

Both Cocoa and Carbon apps tend to cobble together custom UI for the task. A “Save” or “Open” button that triggers a Navigation Services dialog, plus a path text field, and sometimes an icon. Apps tend to be internally consistent – CodeWarrior uses the same aggregate widget everywhere, for instance – but none of them quite match each other.

Cocoa apps often do let you edit the path by hand. It seems to me that this reflects the greater NeXT reliance on the command line, and I can see the utility of it sometimes. But I dislike the potential to erase a path by hitting the delete key by mistake. It also seems to me that this sort of thing is better suited to developer apps, where the user can more safely be assumed to have command line expertise.

Carbon apps, with the old Toolbox deprecation of file paths, generally never allow users to type in the path of the file they want: you must use the Open or Save dialogs to specify the file, though the application might then show you the path afterward.

I can actually see something in-between: maybe in the Save/Open dialog, there is a text field, which reflects the full path of the file/folder you’ve currently chosen. You can type in it, and once a name matches, the Navigation Services portion of the dialog moves to that location specified by your typing. Maybe that’s overkill, but it is the kind of marriage of command-line and UI that I’d really like to see. Toss in tab-completion, and you’re all set!

I’m thinking about this because I’m thinking about how I would modify the UI of TADS Workbench for Macintosh if (more like when) I decide to take over its maintenance. I had my own widget in my Isthmus framework to specify and show a file – I even had a specialization of that widget to deal with special file paths, like the “{Compiler}” and “{Project}” paths in CodeWarrior. I will either have to redo that work for TADS Workbench, discard the concept completely, or – most likely – figure out a more scaled-down version. After all, it was trying to make things perfect that doomed Isthmus.

3 thoughts on “File Imprecations”

  1. Cmd-G? I’m not seeing it, on Panther.

    Option-/ brings up a “Go to the folder” file path edit box in Cocoa Open dialogs, but not in Save dialogs, not in Carbon dialogs, and it doesn’t have tab completion.

    I’m trying BBEdit, Xcode 1.2, TextEdit, Apple Mail…where do you see this behavior?

    Ofc, even if this behavior is in some apps, it doesn’t give me the behavior that’s most appealing to me: matching the file-picking UI to what you’re typing. For that, the text box would have to be in the main window itself, as a custom widget at the bottom, instead of in a separate little sheet, brought up by an obscure, unknown key combination.

    Hm, I got it to show up once for Xcode just now, but the behavior won’t repeat. Perhaps there’s a conflict with apps that use Cmd-G for something else?

Comments are closed.

%d bloggers like this: