[NEWBIE] App with no initial document?
[NEWBIE] App with no initial document?
- Subject: [NEWBIE] App with no initial document?
- From: Eric Smith <email@hidden>
- Date: Sun, 26 Aug 2001 18:05:15 -0400
Greetings,
I am a Cocoa newbie, and having just completed "Learning Cocoa", I'm
trying to write my first document-based Cocoa application.
The application is for annotating image files created by other
applications, so it has no concept of a new, untitled document.
Every document has to come in through File|Open. Unfortunately, my
application insists on starting up with an untitled document. How do
I change this behaviour? I would either like a) to start with just a
menu-bar, or b) to start with a File Open dialog.
Since it doesn't seem to be kosher to subclass NSApplication, I'll
hazard a guess that I have to add a delegate of some sort, and that
it should implement either applicationOpenUntitledFile or
applicationShouldOpenUntitledFile (which one?). But it looks like
delegates have to be hooked up in a .nib file, and the only obvious
possibility is MainMenu.nib. Should I really be hooking up the
delegate in MainMenu.nib? Or should I be setting it programmatically?
Any suggestions as to how to proceed?
Thanks,
Eric Smith
Tarkvara Design Inc.