• 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
modal alert sheets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

modal alert sheets


  • Subject: modal alert sheets
  • From: Robert Vasvari <email@hidden>
  • Date: Mon, 12 Aug 2002 12:43:43 -0700 (PDT)

Howdy,
I am trying to get an alert sheet that is like the
panel of NSGetAlertPanel, but attached to a window as
a sheet. NSGetAlertPanel has a convenient modal API,
and it would be convenient to use where it is
difficult to replace it with non modal alert sheets. I
did this in 10.1.x like this:
NSWindow
*alertPanel=NSGetAlertPanel(aTitle,message,@"OK",nil,nil);
[NSApp beginSheet:alertPanel
modalForWindow:aWindow modalDelegate:nil
didEndSelector:nil
contextInfo:nil];
retCode=[NSApp runModalForWindow:alertPanel];
[alertPanel orderOut:self];
[NSApp endSheet:alertPanel];
NSReleaseAlertPanel(alertPanel);

This no longer works correctly on the Jaguar previews.
I do get the sheet with the buttons, but each button
must be pressed twice in order for [NSApp
stopModalWithCode:] to be called. This might just be a
Jag bug, but is there an easier way to get this modal
alert sheet up?
R
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: modal alert sheets
      • From: Martin Weil <email@hidden>
  • Prev by Date: NSTableView: lifespan of objectValueForTableColumn object?
  • Next by Date: How to send print (should open Print Dialog) command to TextEdit.
  • Previous by thread: Re: NSTableView: lifespan of objectValueForTableColumn object?
  • Next by thread: Re: modal alert sheets
  • Index(es):
    • Date
    • Thread