Re: Getting one sheet to open after another
Re: Getting one sheet to open after another
- Subject: Re: Getting one sheet to open after another
- From: Ian was here <email@hidden>
- Date: Thu, 25 Aug 2005 22:40:49 -0700 (PDT)
When the first sheet is dismissed by the user, you
could have it send a message or notification asking
the second sheet to be shown. In other words, the
second sheet would be activiated from the first
sheet's endSheet: or
sheetDidEnd:returnCode:(contextInfo: method.
--- Ben Borofka <email@hidden> wrote:
> I have a single-window app that requires (at most)
> two decisions from
> the user via sheets. I am having troubles when I
> need to display two
> sheets to the user. How do I get the second sheet to
> wait for the
> first sheet to dismiss before rolling down?
>
> Here are my functions:
>
> //sheet 1
> NSBeginCriticalAlertSheet(@"Do you want to create
> another Passgen
> account on this computer?",
> @"Create Another",
> @"Cancel",
> nil,
> mainWindow,
> self,
>
> @selector(sheetDidEndLocal:returnCode:contextInfo:),
> nil,
> nil,
> @"The account \"%s\" has already been
> created with Passgen
> on this computer.",
> [alreadyGeneratedAccountUsername bytes]);
>
>
> //sheet 2, runs in a different method
> NSBeginCriticalAlertSheet(@"This account already
> exists in the
> Passgen database. Do you want to overwrite it?",
> @"Overwrite",
> @"Cancel",
> nil,
> mainWindow,
> self,
>
>
@selector(sheetDidEndDatabase:returnCode:contextInfo:),
> nil,
> nil,
> @"The account \"%@\" will be
> overwritten.",
> [thisMac stateID]);
>
>
> When sheet 1 rolls down, the app continues to run
> and the second sheet
> rolls down behind it. Once I dismiss the first
> sheet, the main window
> dissappears and all I see is sheet 2.
>
> I've tried using NSLock to lock sections of the code
> before the 2nd
> sheet rolls down, but it doesn't seem to help.
> _______________________________________________
> Do not post admin requests to the list. They will be
> ignored.
> Cocoa-dev mailing list
> (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
>
> This email sent to email@hidden
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden