title: Subclassing NSButton, need to make it look like a regular button
body: <p>I'm subclassing NSButton because I need to repeat a selector while the mouse is being held down.</p>
  
  <p>I'm doing that like this:</p>
  
  <pre><code>- (id)initWithFrame:(NSRect)frame
  {
      self = [super initWithFrame:frame];
      if (self) {
          // Initialization code here.
          [self setBezelStyle:NSBezelBorder];
          PotRightIsDown = NO;
      }
  
      return self;
  }
  
  - (void)drawRect:(NSRect)dirtyRect
  {
      // Drawing code here.
  }
  
  - (void)mouseDown:(NSEvent *)theEvent;
  {    
      NSLog(@"pot right mouse down");
      PotRightIsDown = YES;
      holdDownTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(sendCommand) userInfo:nil repeats:YES];
  }
  
  - (void)mouseUp:(NSEvent *)theEvent;
  {
      NSLog(@"pot right mouse up");
      PotRightIsDown = NO;
  }
  
  -(void)sendCommand
  {
      if (PotRightIsDown)
      {
          NSLog(@"run the stuff here");
      }
      else 
      {
          [holdDownTimer invalidate];
      }
  }
  </code></pre>
  
  <p>Works like a champ, sends the command every 100ms.</p>
  
  <p>In the window in IB, I've dragged a Bevel Button onto the window and set it's class to this subclass.  When I ran the application, the button is invisible however it works.  I'm guessing this is because I have an empty drawRect function in the subclass. </p>
  
  <p>How can I make this subclassed button look like a Bevel button?</p>
  
  <p>Thank you,<br>
  Stateful</p>