View Single Post
jpimbert

 
Member Since: Jan 25, 2009
Posts: 2
jpimbert is on a distinguished road

jpimbert is offline
In your method drawFillWithSliderValue: sliderValue, you must call
Code:
[self setNeedsDisplay:YES]
The actual drawing takes place in the method -(void)drawRect: (NSRect)rect which is called automatically by Cocoa when the View is displayed on the screen.
I recommend you to
  1. rename your method setSliderValue; you will be fully Cocoa compliant
  2. keep only the setting of sliderValueWholeNumber in this method and the call to setNeedsDisplay
  3. put the drawing instructions of your method into a drawRect method (superseding the empty NSView method)
QUOTE Thanks