• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[NEWBIE] App with no initial document?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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.


  • Follow-Ups:
    • Re: [NEWBIE] App with no initial document?
      • From: Kurt Revis <email@hidden>
References: 
 >Re: How can I convert bitmap representations to a "canonical" form (From: Nat! <email@hidden>)

  • Prev by Date: Re: NSTextView
  • Next by Date: Re: Scaling
  • Previous by thread: Re: How can I convert bitmap representations to a "canonical" form
  • Next by thread: Re: [NEWBIE] App with no initial document?
  • Index(es):
    • Date
    • Thread