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

NSToolbar Problem


  • Subject: NSToolbar Problem
  • From: Julian Cain <email@hidden>
  • Date: Fri, 1 Apr 2005 08:30:06 -0500

Hello,
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:

#import "SSTBButton.h"

@implementation SSTBButton

- (void)encodeWithCoder:(NSCoder *)coder {
[super encodeWithCoder:coder];
}

- (id)initWithFrame:(NSRect)frame {
if( ( self = [super initWithFrame:frame] ) ) {
SSTBButtonCell *cell = [[SSTBButtonCell alloc] init];
//[cell setImage[self cell] image]];
[cell setAttributedStringValue:[[self cell] attributedStringValue]];
[cell setTarget:[[self cell] target]];
[cell setAction:[[self cell] action]];
[cell setAlignment:[[self cell] alignment]];
[cell setTitle:[[self cell] title]];
[cell setShowsBorderOnlyWhileMouseInside:YES];
[cell setBordered:YES];
[self setCell:cell];
[cell release];
[self resetTrackingRect];
return self;
}
return nil;
}

- (id)initWithCoder:(NSCoder *)coder {
if( ( self = [super initWithCoder:coder] ) ) {
}
return self;
}

- (void)dealloc {
_trackingRectTag = nil;
[super dealloc];
}

- (void)drawRect:(NSRect)rect {
[super drawRect:rect];
}

- (void)mouseDown:(NSEvent *)event {
[self highlight:YES];
[self display];
[super mouseDown:event];
}
- (void)mouseUp:(NSEvent *)event {
[self highlight:NO];
[self display];
[super mouseUp:event];
}


Thanks in advance,
~Julian
 _______________________________________________
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: j o a r <email@hidden>
  • Prev by Date: Re: Apple's Code Level Support
  • Next by Date: Re: NSTableView lost focus detection
  • Previous by thread: Re: bindings...
  • Next by thread: Re: NSToolbar Problem
  • Index(es):
    • Date
    • Thread