• 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: Alert Sheets hard wired in Interface Builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alert Sheets hard wired in Interface Builder


  • Subject: Re: Alert Sheets hard wired in Interface Builder
  • From: Chris Hanson <email@hidden>
  • Date: Wed, 28 May 2008 22:44:25 -0700

On May 27, 2008, at 9:06 PM, Jens Alfke wrote:

On 27 May '08, at 1:40 PM, Kyle Sluder wrote:

You're looking for +[NSApplication
beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:],

I'm not surprised the OP didn't find this … it's my candidate for Most Misplaced Cocoa Method.

I suspect the general sheet methods (which are instance methods, not class methods) are on NSApplication for largely historical reasons. If you look at <AppKit/NSApplication.h>, you'll see that NSApplication has a couple of instance methods dealing with running a modal session "relative to" a window:


- (NSInteger)runModalForWindow:(NSWindow *)theWindow relativeToWindow: (NSWindow *)docWindow;
- (NSModalSession)beginModalSessionForWindow:(NSWindow *)theWindow relativeToWindow:(NSWindow *)docWindow;


These are effectively the OpenStep predecessor to sheets. They're preceded by comments indicating that they're deprecated, but are not formally tagged as such in the headers.

There are also similar -- and similarly-deprecated -- functions in <AppKit/NSPanel.h> for running alert panels relative to a window.

In both cases, sheets are called out as the replacement technology, and the replacements are defined practically right next to the deprecated functionality.

  -- Chris

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Alert Sheets hard wired in Interface Builder (From: "John Love" <email@hidden>)
 >Re: Alert Sheets hard wired in Interface Builder (From: "Kyle Sluder" <email@hidden>)
 >Re: Alert Sheets hard wired in Interface Builder (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Attaching file to an email using Cocoa APIs
  • Next by Date: NSFileHandle fileHandleForUpdatingAtPath never returns
  • Previous by thread: Re: Alert Sheets hard wired in Interface Builder
  • Next by thread: Re: Alert Sheets hard wired in Interface Builder
  • Index(es):
    • Date
    • Thread