• 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
Starting an alert sheet from an NSWindowController that owns a user-editable sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Starting an alert sheet from an NSWindowController that owns a user-editable sheet


  • Subject: Starting an alert sheet from an NSWindowController that owns a user-editable sheet
  • From: Jonathan Dann <email@hidden>
  • Date: Thu, 17 Jan 2008 17:56:17 +0000

Hi All,

I'm writing a document-based application that works similarly to Keynote/Pages/Numbers on loading. When the user want to create a new document, the document window opens and a sheet drops down with some options, one is to specify a directory. What I want to do is to present a document-modal error if possible, but the HIG say that you shouldn't (and Cocoa can't) stack a sheet on a sheet.

So I need to order out the initial sheet and present the error alert (e.g. that directory wasn't write-able) as another sheet, then bring my original sheet back.

The problem is, I've factored out all the code that managed and instantiates the sheet into a NSWindowController subclass, as per the advice on Wil Shipley's blog.

Any ideas how I can do this from within the NSWindowController subclass, as this seems like it would be the appropriate place to handle all my errors as all the ivars (like the one that holds the directory name that the user is trying to create) are within the controller class already because they are used by the sheet.

Its easy enough to just disable the button that ends the sheet, but I want to tell the user that they did wrong on the document they are working on without running an application-modal alert when it really is a document-modal error.

Thanks for any advice,

Jonathan
_______________________________________________

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


  • Follow-Ups:
    • Re: Starting an alert sheet from an NSWindowController that owns a user-editable sheet
      • From: Seth Willits <email@hidden>
    • Re: Starting an alert sheet from an NSWindowController that owns a user-editable sheet
      • From: Keary Suska <email@hidden>
  • Prev by Date: Custom Column Header
  • Next by Date: Re: NSTimer problem
  • Previous by thread: Re: Custom Column Header
  • Next by thread: Re: Starting an alert sheet from an NSWindowController that owns a user-editable sheet
  • Index(es):
    • Date
    • Thread