• 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: Sheet on new document?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sheet on new document?


  • Subject: Re: Sheet on new document?
  • From: Fritz Anderson <email@hidden>
  • Date: Wed, 5 Nov 2003 09:48:30 -0600
  • Resent-date: Wed, 5 Nov 2003 09:49:19 -0600
  • Resent-from: Fritz Anderson <email@hidden>
  • Resent-message-id: <email@hidden g>
  • Resent-to: Cocoa-Dev Development <email@hidden>

I've found windowControllerDidLoadNib: to be too early to do event-loop business with a document. My workaround (I'd love to hear a better alternative) is to put my open-document business in a separate method (call it openDocumentBusiness for example) and put

[self performSelector: @selector(openDocumentBusiness) withObject: nil afterDelay: 0.1];

in windowControllerDidLoadNib:.

-- F


On 4 Nov 2003, at 7:52 PM, Jeff LaMarche wrote:

Using the "Document-Based App" template, I want to show a sheet as soon as a new document is created and its window is shown in order to solicit some required information. Using NSApp beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo: in either awakeFromNib or windowControllerDidLoadNib:, the window hasn't been shown, so the sheet ends up floating as a window behind the main window.

Is there a delegate or notification method where it would be appropriate to do this?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Open-source icons and graphics?
  • Next by Date: Re: Exposé and Cocoa
  • Previous by thread: Sheet on new document?
  • Next by thread: String conversion problem from web
  • Index(es):
    • Date
    • Thread