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

Two clicks to dismiss a sheet?


  • Subject: Two clicks to dismiss a sheet?
  • From: Tito Ciuro <email@hidden>
  • Date: Sat, 16 Sep 2006 04:42:29 -0700

Hello,

After I display a sheet, it take two clicks to dismiss it. Any idea why? This is the code:

id alertSheet = NSGetCriticalAlertPanel(@"Title", @"Msg", @"OK", @"Cancel", nil);

    [NSApp beginSheet: alertSheet
    modalForWindow: window
    modalDelegate: nil
    didEndSelector: nil
    contextInfo: nil];

    int choice = [NSApp runModalForWindow: alertSheet];

    [NSApp endSheet: alertSheet];
    [alertSheet orderOut: self];

NSLog(@"Sheet has been dismissed with button: %i", choice);

If I want to dismiss it with the 'Esc' or 'Return' key, I have to press the key twice. Why is that?


Thanks!

-- Tito
_______________________________________________
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: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Mixing Chinese and Japanese text
  • Next by Date: End type toBezier line.
  • Previous by thread: Persistent Store Error
  • Next by thread: Re: Two clicks to dismiss a sheet?
  • Index(es):
    • Date
    • Thread