title: Action is called twice (mouse up/down) when Target is clicked in Cocoa/objective-c
body: <p>I have a NSDatePicker (target), and datePickerAction (action)</p>
  
  <pre><code>- (IBAction)datePickerAction:(id)sender
  {
  
      if( [[[NSApplication sharedApplication] currentEvent] modifierFlags] &amp; 
         NSShiftKeyMask )
          NSLog(@"shift pressed %@", [datePicker dateValue]);
  
      else
          NSLog(@"hello %@", [datePicker dateValue]);
  
  }
  </code></pre>
  
  <p>It works well as when I click a date in NSDatePicker object, the method(action) is called, the problem is that the method is called twice - mouse down/up.</p>
  
  <p>Can I make the method called only once (up or down)?</p>
  
  <h2>EDIT</h2>
  
  <p>I only have the method to be selected.</p>
  
  <p><img src="https://i.stack.imgur.com/FeDD2.png" alt="enter image description here"></p>
  
  <p>And this is connection inspector.
  <img src="https://i.stack.imgur.com/487GW.png" alt="enter image description here"></p>