Consider the following if statement:
if(dragOperation != NSDragOperationCopy && NSPointInRect(currentMouseLocation, self.bounds)){
//do something
}
Even though you may have worked out what the condition represents, it probably took you a little longer than it should. It's complicated, making it time consuming to read, and prone to bugs upon modification. Thankfully, there is an easy remedy: