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: "Marcus S. Zarra" <email@hidden>
- Date: Thu, 25 Aug 2005 19:19:31 -0600
The ending method for sheet one should then call sheet 2.
In your example, in the method
sheetDidEndLocal:returnCode:contextInfo: should call the second sheet.
On 8/25/05, 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
>
_______________________________________________
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