• 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
RE: Getting one sheet to open after another
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Getting one sheet to open after another


  • Subject: RE: Getting one sheet to open after another
  • From: "Christopher Hickman" <email@hidden>
  • Date: Fri, 26 Aug 2005 11:50:32 -0400

Maybe you just need the second sheet call to be run in your
sheetDidEndLocal:returnCode:contextInfo: method?

-----Original Message-----
From: cocoa-dev-bounces+tophu=email@hidden
[mailto:cocoa-dev-bounces+tophu=email@hidden] On Behalf Of Ben
Borofka
Sent: Thursday, August 25, 2005 7:39 PM
To: email@hidden
Subject: Getting one sheet to open after another

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

References: 
 >Getting one sheet to open after another (From: Ben Borofka <email@hidden>)

  • Prev by Date: Focus ring annoyance
  • Next by Date: How to know and open Password protected pdf (like preview)
  • Previous by thread: Re: Getting one sheet to open after another
  • Next by thread: NSLayoutManager/NSTypesetter ignoring paragraphSpacingBefore
  • Index(es):
    • Date
    • Thread