title: drag & drop in cocoa app doesn't work with subclass of NSView
body: <p>I am trying to follow this tutorial (<a href="https://www.youtube.com/watch?v=UZ0mp3-JuzY&amp;index=25&amp;list=PLE83F832121568D36" rel="nofollow">https://www.youtube.com/watch?v=UZ0mp3-JuzY&amp;index=25&amp;list=PLE83F832121568D36</a>) on drag &amp; drop in Cocoa app.</p>
  
  <p>I am using XCode6, so some methods used in the video are deprecated.</p>
  
  <p>I have make subclass of NSView, named DropView, and I have make my customView identifier to be DropView</p>
  
  <p>Here is the code that I have now:</p>
  
  <pre><code>#import "DropView.h"
  @implementation DropView
  
  -(id)initWithFrame:(NSRect)frameRect
  {
      self = [super initWithFrame:frameRect];
      if(self) {
          [self registerForDraggedTypes:[NSArray arrayWithObject:NSURLPboardType]];
      }
      return self;
  }
  
  
  -(NSDragOperation) draggingEntered:(id&lt;NSDraggingInfo&gt;)sender
  {
      if ([NSImage canInitWithPasteboard:[sender draggingPasteboard]] &amp;&amp; [sender draggingSourceOperationMask] &amp; NSDragOperationCopy)
      {
          NSLog(@"ENTERED");
          return NSDragOperationCopy;
      }
      NSLog(@"NEVER ENTERED IN DRAGGING ENTERED METHOD");
      return NSDragOperationNone;
  }
  
  
  -(NSDragOperation)draggingUpdated:(id&lt;NSDraggingInfo&gt;)sender
  {
      NSLog(@"DRAGGING");
      return NSDragOperationCopy;
  }
  
  
  -(void)draggingEnded:(id&lt;NSDraggingInfo&gt;)sender
  {
      NSLog(@"ENDED!");
  }
  
  
  -(void)draggingExited:(id&lt;NSDraggingInfo&gt;)sender
  {
      NSLog(@"EXITED!");
  }
  
  
  -(BOOL)prepareForDragOperation:(id&lt;NSDraggingInfo&gt;)sender
  {
      NSLog(@"DID I EVER ENTER PREPARE FOR DRAG OPERATION METHOD?");
      return YES;
  }
  
  
  -(BOOL)performDragOperation:(id&lt;NSDraggingInfo&gt;)sender
  {
      if([NSImage canInitWithPasteboard:[sender draggingPasteboard]])
      {
          NSImage *newImage = [[NSImage alloc ]initWithPasteboard:[sender draggingPasteboard]];
          [self setImage:newImage];
      }
      return YES;
  }
  
  
  -(void)concludeDragOperation:(id&lt;NSDraggingInfo&gt;)sender
  {
      [self setNeedsDisplay:YES];
  }
  
  @end
  </code></pre>
  
  <p>I am not getting any error, but It seems that no code is executed. My guess is that frameRect is nil, that is is not initialized, but i have no idea why. Anyone can help me with this problem?</p>
  
  <p>Regards, John</p>