20 likes | 189 Vues
MyController. Interface. Outlets: IBOutlet NSLevelIndicator *myLevelIndicator; IBOutlet NSTextField *xValueField; IBOutlet NSTextField *sineValueField; Methods: - (void)setX:(id)sender;. Implementation. setX:. - (void)setX:(id)sender { float x, sinex;
E N D
MyController Interface Outlets: IBOutlet NSLevelIndicator *myLevelIndicator; IBOutlet NSTextField *xValueField; IBOutlet NSTextField *sineValueField; Methods: - (void)setX:(id)sender; Implementation setX: - (void)setX:(id)sender { float x, sinex; x = [sender floatValue]; sinex = sin(x); [myLevelIndicator setFloatValue: sinex]; [sineValueField setFloatValue: sinex]; [xValueField setFloatValue: x]; } floatValue setFloatValue: