• 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: NSToolbar Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSToolbar Problem
      • From: daniel <email@hidden>
References: 
 >NSToolbar Problem (From: Julian Cain <email@hidden>)
 >Re: NSToolbar Problem (From: j o a r <email@hidden>)

  • Prev by Date: Re: More Newbie Trouble with Basic Bindings
  • Next by Date: bindings, NSPopUpButtonCell, and images
  • Previous by thread: Re: NSToolbar Problem
  • Next by thread: Re: NSToolbar Problem
  • Index(es):
    • Date
    • Thread