Re: Disturbing Control Problem in Tiger
Re: Disturbing Control Problem in Tiger
- Subject: Re: Disturbing Control Problem in Tiger
- From: Fritz Anderson <email@hidden>
- Date: Thu, 23 Jun 2005 09:35:05 -0500
On 23 Jun 2005, at 9:15 AM, John Nairn wrote: NSButton *newBtn=[[NSButton alloc] init]; [newBtn setFrame:[srcBtn frame]];
-init is not the designated initializer for NSButton (or any NSView). -initWithFrame: is. [box addSubview:newBtn];
// copy properties from source button NSButtonCell *btnCell=[newBtn cell]; NSButtonCell *srcCell=[newBtn cell]; [btnCell setButtonType:aType]; [btnCell setControlSize:[srcCell controlSize]];
From this last line, I don't think you mean to initialize srcCell and btnCell to be the same thing.
Query on why you are using cell methods to copy traits that can be copied at the control level. Pick up AppKiDo, < http://homepage.mac.com/aglee/downloads>, for a tool that will let you see all the inherited methods of a framework's class.
-- F
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden