O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSControl — Mac OS X 10.0

Synopsis

NSControl is a subclass of NSView that is the base class of all AppKit controls like text fields (NSTextField), buttons (NSButton), table views (NSTableView), color wells (NSColorWell), and more. Controls generally have associated cells that are responsible for presenting the graphical appearance of the control, and responding appropriately to user interaction with the control.

image with no caption

@interface NSControl : NSView
                                  // Initializers
   - (id)initWithFrame:(NSRect)frameRect;
                                  // Accessor Methods
   - (void)setTag:(int)anInt;
   - (int)tag;
   - (void)setCell:(NSCell *)aCell;
   - (id)cell;
   - (void)setNeedsDisplay;
   - (void)setTarget:(id)anObject;
   - (id)target;
   - (void)setAction:(SEL)aSelector;
   - (SEL)action;
   - (void)setFormatter:(NSFormatter *)newFormatter;
   - (id)formatter;
   - (void)setIgnoresMultiClick:(BOOL)flag;
   - (BOOL)ignoresMultiClick;
   - (void)setIntValue:(int)anInt;
   - (int)intValue;
   - (void)setStringValue:(NSString *)aString;
   - (NSString *)stringValue;
   - (void)setFloatValue:(float)aFloat;
   - (float)floatValue;
   - (void)setAttributedStringValue:(NSAttributedString *)obj;
   - (NSAttributedString *)attributedStringValue;
   - (void)setDoubleValue:(double)aDouble;
   - (double)doubleValue;
   - (void)setEnabled:(BOOL)flag;
   - (void)setFloatingPointFormat:(BOOL)autoRange 
                                 left:(unsigned)leftDigits 
                                 right:(unsigned)rightDigits ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required