Skip navigation.
 
ml'dragging Entered' never called
FROM : Steve Cronin
DATE : Fri Apr 27 22:21:36 2007

Folks;

I've hit a drag & drop problem:  'draggingEntered' is never getting 
called!!

I've tried many things but I believe I have pared it down to bare 
bones with this:
I have a non-document Cocoa app.

I have subClassed NSWindow: MyMainWindow.
The only window in MainMenu.nib is an instance of MyMainWndow.
Below is the entire contents of MyMainWindow.m

There is NO delegate set in IB (I've tried with it set and many other 
cases).
'Awake' is being called as expected.
But that's it.  Nothing else ever shows up in the log and I do NOT 
get the standard drag image.

The way I have it setup for now, I think I should see 'dragEntered' 
REGARDLESS of what I am dragging...
But, yes, I AM using a vCard to test.

Can someone please give me the brain shake I need to see what I'm 
missing!!
Steve

PS There is a regular NSSearchField on the window and when I hover 
any vCard over it, I DO see the appropriate drag image


@implementation MyMainWindow
- (void) awakeFromNib
{
   NSLog(@"awake");
   [self registerForDraggedTypes:[NSArray 
arrayWithObject:NSVCardPboardType]];
}

- (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender
{
   NSLog(@"dragEnter");
   return NSDragOperationCopy;
}

- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
   NSLog(@"perform");
   return YES;
}

- (BOOL) prepareForDragOperation:(id <NSDraggingInfo>)sender {return 
YES;}
- (void) draggingExited:(id <NSDraggingInfo>)sender {}
- (void) concludeDragOperation:(id <NSDraggingInfo>)sender {}
@end

Related mailsAuthorDate
ml'dragging Entered' never called Steve Cronin Apr 27, 22:21
mlRe: 'dragging Entered' never called Glen Simmons Apr 27, 22:26
mlRe: 'dragging Entered' never called Steve Cronin Apr 27, 23:00
mlRe: 'dragging Entered' never called Glen Simmons Apr 27, 23:24