View Single Post
Mark FX

Mark FX's Avatar
Member Since: Aug 13, 2011
Location: West Sussex, UK
Posts: 180
Mark FX has a spectacular aura about

Mark FX is offline
I was reading the drawInteriorWithFrame:inView: method description in the documentation, listed below, and thats where it reccomends not using the drawWithFrame:inView: method,
but if neither method is getting called then it's irrelevant anyway.

Draws the interior portion of the receiver, which includes the image or text portion but does not include the border.

- (void)drawInteriorWithFrameNSRect)cellFrame inViewNSView *)controlView
The bounding rectangle of the receiver, or a portion of the bounding rectangle.
The control that manages the cell.
Text-type NSCell objects display their contents in a rectangle slightly inset from cellFrame using a global NSText object. Image-type NSCell objects display their contents centered within cellFrame. If the proper attributes are set, this method also displays the dotted-line rectangle to indicate if the control is the first responder and highlights the cell. This method is invoked from the drawCellInside: method of NSControl to visually update what the cell displays when its contents change. The drawing done by the NSCell implementation is minimal and becomes more complex in objects such as NSButtonCell and NSSliderCell.

This method draws the cell in the currently focused view, which can be different from the controlView passed in. Taking advantage of this is not recommended.

Subclasses often override this method to provide more sophisticated drawing of cell contents. Because drawWithFrame:inView: invokes drawInteriorWithFrame:inView: after it draws the cell's border, do not invoke drawWithFrame:inView: in your override implementation.

Available in OS X v10.0 and later.
See Also
Declared In
If neither method is getting called then you need to test that your NSCell subclass has been initialized properly, perhaps by checking one of it's properties in the log.

Regards Mark
QUOTE Thanks