I'm still a little unclear on when to use an NSWindow and when to use an NSPanel. I thought you used an NSPanel if you did *not* want it to become key. But for input, you do want it to become key, don't you? I'm sure I've missed some basic Cocoa 101 here, but I found the docs "clear as mud" on this.
Dave On 2012-02-02, at 6:02 PM, Graham Cox wrote: > > On 03/02/2012, at 9:37 AM, Quincey Morris wrote: > >> You're the second person who's scorned the idea of adding things to an >> alert. In fact, NSAlert is explicitly designed to allow adding controls via >> an accessory subview: >> >> >> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Dialog/Articles/CustomAlertDialogs.html >> >> One of the benefits of using a customized alert is that you don't have to >> worry about resizing the window based on the size of the message and >> informative text. >> >> OTOH, looking at the OP's links to screenshots, two things are obvious: >> >> 1. This particular task isn't one that NSAlert is suitable for. It's not >> actually an alert. > > We used to call these 'dialogs'. Panels seems to be the preferred Cocoa > terminology. > > Notwithstanding the (minor) benefits of NSAlert, (and internally it's > implemented in terms of NSPanel, I would assume), the design of NSAlert makes > it harder to set up interactivity, because it doesn't have an explicit > controller - it inherits NSObject, not NSWindowController or even NSPanel. In > other words, it's designed for a different job to the OP's. > > My view is, if you need any input fields in a dialog, the go-to class is > NSPanel, not NSAlert. > >> >> 2. There are no new frontiers in Cyrillic pornography. ;) > > LOL, indeed. > > --Graham > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/dave.fernandes%40utoronto.ca > > This email sent to dave.fernan...@utoronto.ca _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com