Skip navigation.
 
mlRe: Starting an alert sheet from an NSWindowController that owns a user-editable sheet
FROM : Seth Willits
DATE : Fri Jan 18 20:06:23 2008

On Jan 17, 2008, at 9:56 AM, Jonathan Dann wrote:

> ...but the HIG say that you shouldn't (and Cocoa can't) stack a 
> sheet on a sheet.


Unfortunately Cocoa can.....
http://www.sethwillits.com/temp/LeopardSheetBug.mov

(I'm not sure whyyyy it does it here, but it does.)



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


Why is that a problem?



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


If you have room, maybe you could stick an error message in the first 
sheet somewhere.



--
Seth Willits