Re: Customize NSAlert?
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