You'd use the following code:
[slider setTarget:self];
[slider setAction:@selector(valueChanged:)];
That's it.
NSSlider
uses an NSSliderCell
, which is a custom subclass of NSActionCell
; I'd look over that documentation for the target action mechanism in Cocoa.