Re: NSToolbar Problem
Re: NSToolbar Problem
- Subject: Re: NSToolbar Problem
- From: Julian Cain <email@hidden>
- Date: Fri, 1 Apr 2005 11:25:54 -0500
I have also changed "initWithCoder" to no avail...
- (id)initWithCoder:(NSCoder *)coder {
if( ( self = [super initWithCoder:coder] ) ) {
NSButtonCell *oldCell = [self cell];
NSLog(@"initWithCoder:");
SSTBButtonCell *cell = [[SSTBButtonCell alloc] init];
//[cell setImage[self cell] image]];
[cell setAttributedStringValue:[oldCell attributedStringValue]];
[cell setTarget:[oldCell target]];
[cell setAction:[oldCell action]];
[cell setAlignment:[oldCell alignment]];
[cell setTitle:[oldCell title]];
[cell setBordered:YES];
[self setCell:cell];
[cell release];
}
return self;
}
-Julian
On Apr 1, 2005, at 10:06 AM, j o a r wrote:
On 2005-04-01, at 15.30, Julian Cain wrote:
I have created a subclassed NSButton which I have in an NSToolbar, however when I run the customization palette the button image goes blank on the palette and toolbar. My Button code looks like so:
It seems to me that you have an incorrect implementation of NSCoding. You only set the custom button cell type when you "-initWithFrame:", not when you "-initWithCoder:".
j o a r
_______________________________________________
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