• 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
Re: document-based application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: document-based application


  • Subject: Re: document-based application
  • From: Nathan Day <email@hidden>
  • Date: Mon, 07 Sep 2009 23:00:50 +1000

That is the way I do it, I don't see why it wouldn't work 100% of the time, it would be nice if Apple had a way to insert a template chooser, but I would describe the way you have done it as 'an ugly hack'.

On 07/09/2009, at 3:24 PM, Oftenwrong Soong wrote:

Hi All,

In my doc-based app, I need to initially display a startup window instead of a new empty document. Its function would be somewhat akin to that of the Template Chooser that comes up when you launch Pages.

I've scoured the texts about the document architecture but cannot find pointers on how to do this.

So far this is the best idea I could come up with:

Implement NSApplication delegate applicationShouldOpenUntitledFile:, returning NO, and implement applicationDidFinishLaunching:, in which the startup window is launched. Then I manually call makeUntitledDocumentOfType:error.

It seems an ugly hack and I have a feeling it won't work 100% right. Is there a better way to implement an initial window in a doc-based app?

Thanks,
Soong





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >document-based application (From: Oftenwrong Soong <email@hidden>)

  • Prev by Date: Re: Weird malloc error when dealing with lots of NSImage objects
  • Next by Date: Re: Turn on zombies in user environment?
  • Previous by thread: Re: document-based application
  • Next by thread: Re: document-based application
  • Index(es):
    • Date
    • Thread