Oleg Andreev wrote:

> Is there a well-known way (or a library) to keep a stack (or queue) of sheets 
> per window? 
> 
> I'm a developer of Gitbox - a git repository manager. It keeps several repos 
> opened and periodically updates them. If some repos require authentication, a 
> modal dialog pops up. I'd like to clean up these dialogs by attaching them as 
> sheets to the main window. But since NSApp does not manage any form of stack 
> or queue of sheets, I need to take care of it myself: that is maintaining a 
> queue of windows to be displayed as sheets and displaying next sheet when the 
> previous one was dismissed.
> 
> Something like:
> 
> [mainWindowController queueSheet:aWindow completionHandler:^(NSInteger 
> returnCode){
>  ...
> }];
> 
> 
> So the questions are:
> 
> 1. Is there a code already doing that? If not, then I'll just write it myself.
> 2. Is it a good way to solve the problem? Maybe I miss some subtle issues 
> with AppKit or user experience.

I think the notion of a "stack" of sheets is bizarre. In the very rare 
scenarios where multiple sheets are used to accomplish something, I've never 
seen them presented as anything other than a strict sequence. When sheet N is 
dismissed, if more information is needed sheet N+1 will be presented. When 
sheet N+1 is dismissed, the user is shown the unobstructed window. When you say 
"stack" I infer that you intended to re-show sheet N.

<http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Sheets/Tasks/UsingCascadingSheets.html%23//apple_ref/doc/uid/20001046-BABFIBIA>

I should also say that having used OS X since the public beta I've rarely seen 
2 sheets, and never 3 in a sequence. It might be a good idea to revisit your UI 
plans. Perhaps you can use fewer sheets but with optional parts akin to the 
print job sheet.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to