On Oct 7, 2009, at 2:09 PM, Jens Alfke wrote:
I think the best way is to create your own alert panel in a nib and run it modally. That way you have total control — you can set your own window delegate to handle key events, for example.
I had a similar solution beforehand but gave up on it because the layout was painful to control, and the sheet animation wasn't quite right. Future compatibility is an important consideration.
Of course I'm already subclassing NSAlert. On Oct 7, 2009, at 2:04 PM, Kyle Sluder wrote:
You're probably going to need to stop using NSAlert and start using your own window as a sheet. Then you should be able to override -sendEvent: to perform your custom processing.
Hmm, if I define @interface MyNSWindow : NSWindow @interface MyNSAlert : NSAlert can I then perhaps, in @implementation MyNSAlert: window = (MyNSAlert*) [window clone];That way I could get NSAlert to do all the layout and prepare the window, but then take over and roll my own?
- D
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com