I have NSDatePicker (target) and datePickerAction (action)
- (IBAction)datePickerAction:(id)sender
{
if( [[[NSApplication sharedApplication] currentEvent] modifierFlags] &
NSShiftKeyMask )
NSLog(@"shift pressed %@", [datePicker dateValue]);
else
NSLog(@"hello %@", [datePicker dateValue]);
}
This works well when I click the date in the NSDatePicker object, the method (action) is called, the problem is that the method is called twice - mouse down / up.
Is it possible to call a method only once (up or down)?
EDIT
I have only the method to choose.

And this is the connection inspector.

source
share