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

Re: Customize NSAlert?


  • Subject: Re: Customize NSAlert?
  • From: Ricky Sharp <email@hidden>
  • Date: Mon, 5 Feb 2007 12:51:14 -0600


On Feb 5, 2007, at 12:08 PM, I. Savant wrote:

On Feb 5, 2007, at 12:36 PM, Matt Neuburg wrote:
NSButton* dontAskButton = [[NSButton alloc] init] ;

Initializing a button with "init" is certainly "something wrong" (though
this does not go to the heart of your original question). m.

To elaborate this rather vague point, initializing any view with - init pretty much guarantees problems. Views should be initialized with -initWithFrame: so they actually *have* a frame.


Basically, if it's on-screen it should have a frame.

And to further generalize, ensure you always use the designated initializer (initWithFrame: being the one for views). The only exception to this is if the instance in question will have come from an archive in which case initWithCoder: will be used instead.


___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

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


References: 
 >Re: Customize NSAlert? (From: Matt Neuburg <email@hidden>)
 >Re: Customize NSAlert? (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: setString question...
  • Next by Date: Re: setString question...
  • Previous by thread: Re: Customize NSAlert?
  • Next by thread: Re: Customize NSAlert?
  • Index(es):
    • Date
    • Thread