title: Cocoa Drag and Drop delegates not working the way I would expect
body: <p>I made a very simple class that subclasses NSTextField so I could have more control over the drag and drop behavior, but I'm running into confusion. According to what I think I understand in the apple.developer docs on Dragging destinations, I should be able to get the delegates to fire when I enter or exit the bounds of the text field, but what I get instead is that the delegates don't fire until I have dropped something into the textField and then I try to drag it out.</p>
  
  <p>I have a MyController class which is an NSObject and I have a CustomFields class of type NSTextField;  There is nothing in the controller class.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>//  CustomFields.h
  //  Drags
  //
  
  #import &lt;AppKit/AppKit.h&gt;
  #import &lt;Foundation/foundation.h&gt;
  
  @interface CustomFields : NSTextField{
  
      NSString *tempStorage_;
      unsigned long last_;
  }
  @property(readwrite, retain) NSString *tempStorage;
  
  @end
  
  
  
  //
  //  CustomFields.m
  //  Drags
  //
  
  #import "CustomFields.h"
  
  @implementation CustomFields
  
  @synthesize tempStorage = tempStorage_;
  
  
  - (id)init{
  
      if (self) {
  
          self = [super init];
  
      }
  
      return self;
  }
  
  -(void)dealloc{
  
      [self.tempStorage release ];
      [super release];
  }
  
  -(void)awakeFromNib{
  
      NSLog(@"Awake from nib called");
  
      self.tempStorage = @"";
      self-&gt;last_ = 0;
      [self setBackgroundColor:[NSColor lightGrayColor]];
      [self registerForDraggedTypes:[NSArray arrayWithObjects: NSPasteboardTypeString ,   NSPasteboardTypeString, nil]];
  
      [super awakeFromNib];
  
   }
  
  
  
  - (NSDragOperation)draggingEntered:(id &lt;NSDraggingInfo&gt;)sender
  {
  
      NSLog(@"Inside dragging entered");
  
          return NSDragOperationCopy;
  }
  
  
  
  - (NSDragOperation)draggingUpdated:(id &lt;NSDraggingInfo&gt;)sender
  {
      NSLog(@" draggingUpdated called");
      return NSDragOperationCopy;
  }
  
  
  
  - (void)draggingExited:(id &lt;NSDraggingInfo&gt;)sender
  {
  
      NSLog(@"Inside dragging exited");
  
  }
  
  @end
  
  
  //
  //  MyController.h
  //  Drags
  //
  
  
  #import &lt;Foundation/Foundation.h&gt;
  
  @class CustomFields;
  
  @interface MyController : NSObject{
  
      IBOutlet NSButton *myButton_;
  
      IBOutlet CustomFields *field1_;
      IBOutlet CustomFields *field2_;
  
  }
  
  @end
  
  
  
  //
  //  MyController.m
  //  Drags
  //
  
  
  #import "MyController.h"
  #import "CustomFields.h"
  
  @implementation MyController
  
  
  
  @end
  </code></pre>
  
  <p>I made sure I assigned the correct class to the fields(CustomFields) in IB and connected them. As you can see, for the moment I would be happy to get log statements at the proper time. I also tried changing the MyController class to NSViewController and NSView so I could try registerForDraggedTypes there. That did'nt help anything and I don't think I should expect it to. I think the behaviors I want should be confined to the CustomFields Class which is one of the reasons the MyController class can be empty for the moment.</p>
  
  <p>So any help is much apprecieted.  </p>