Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to wrap an NSAlert so the caller can call one function and get the NSAlert return value (i.e. modal)



On May 12, 2008, at 7:18 PM, Rua Haszard Morris wrote:
Is there a way to wrap up an NSAlert, the beginSheetModalForWindow call, and the alertDidEnd implementation, such that a caller can just call one function which blocks until the alert is dismissed?

NSAlert has the -runModal method. However, that makes the alert application-modal rather than window-modal. It's not a sheet, and the application can't be used for anything else until the alert is dismissed.


For the vast majority of applications this is the wrong user experience. However, for certain rare kinds of applications it's appropriate.

Cheers,
Ken

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >how to wrap an NSAlert so the caller can call one function and get the NSAlert return value (i.e. modal) (From: Rua Haszard Morris <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.