• 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
Customize NSAlert?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Customize NSAlert?


  • Subject: Customize NSAlert?
  • From: Dave Jewell <email@hidden>
  • Date: Wed, 7 Feb 2007 00:32:12 +0000

Hi Jerry. The simplest way to add a "Don't show me this again" checkbox to NSAlert is (somewhat inevitably) to use an undocumented API. There are two messages which are relevant. Firstly:

- (void) _setDontWarnMessage: (NSString *) message;

You use this message to set the text for your checkbox while setting up your NSAlert but (obviously) before calling runModal.

Secondly, after calling runModal, you can use the message below to test whether the user checked the box.

- (BOOL) _dontWarnAgain;

At this point someone will doubtless read me the riot act for mentioning undocumented calls. :-)

But the simplicity of use of these two methods contrasts strongly with the major PITA that you have to go through without them. This functionality is needed so frequently that this stuff really SHOULD be part of the official API.

Dave

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Re: Editable PDFAnnotation
  • Next by Date: Re: Adding binding types to custom IB palete
  • Previous by thread: Re: Customize NSAlert?
  • Next by thread: Binding to a specific element in an array
  • Index(es):
    • Date
    • Thread