• 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: Two clicks to dismiss a sheet?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two clicks to dismiss a sheet?


  • Subject: Re: Two clicks to dismiss a sheet?
  • From: Nick Zitzmann <email@hidden>
  • Date: Sat, 16 Sep 2006 15:25:00 -0600


On Sep 16, 2006, at 5:42 AM, Tito Ciuro wrote:

After I display a sheet, it take two clicks to dismiss it. Any idea why?

You're running a sheet as an application-modal window. Sheets are window-modal, not application-modal. Try this instead: (pseudo-code written in Mail; it won't compile)


- (void)someMethod
{
NSBeginCriticalAlertSheet(@"title", nil, nil, nil, window, self, @selector(sheetDidEnd:returnCode:contextInfo:), NULL, NULL, @"message");
}


- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
// do something here if you want to, then...
[sheet orderOut:self];
}


Nick Zitzmann
<http://www.chronosnet.com/>




_______________________________________________ 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
  • Follow-Ups:
    • Re: Two clicks to dismiss a sheet?
      • From: Tito Ciuro <email@hidden>
References: 
 >Two clicks to dismiss a sheet? (From: Tito Ciuro <email@hidden>)

  • Prev by Date: Drawing 32-bit images into an NSBitmapImageRep
  • Next by Date: Binding to NSTextView
  • Previous by thread: Two clicks to dismiss a sheet?
  • Next by thread: Re: Two clicks to dismiss a sheet?
  • Index(es):
    • Date
    • Thread