Re: 'dragging Entered' never called
Re: 'dragging Entered' never called
- Subject: Re: 'dragging Entered' never called
- From: Glen Simmons <email@hidden>
- Date: Fri, 27 Apr 2007 16:24:09 -0500
Those look like private types that will be of no help to you. The
NSFilenamesPboardType probably contains the path to a temporary file
that has the data you want. Look in that direction.
On Apr 27, 2007, at 4:00 PM, Steve Cronin wrote:
Glen;
Hey good info (in an offline email) it DOES make sense that I if
register for X but if I drag Y then draggingEntered does NOT get
called!!
THANKS for that whack on the head!
So I took your suggestion and registered for NSURLPboardType as well.
Now I get feedback! Here's what the [[sender draggingPasteboard]
types] is showing:
(which explains why i wasn't seeing a response for vCard drags!)
2007-04-27 15:46:14.693 XYZ[4945] pBoard: (
"CorePasteboardFlavorType 0x6675726C",
NSFilenamesPboardType,
"Apple URL pasteboard type",
"CorePasteboardFlavorType 0xC46C6E6B",
"CorePasteboardFlavorType 0x73646C74",
"CorePasteboardFlavorType 0x6F726769",
"CorePasteboardFlavorType 0x626E6368",
"CorePasteboardFlavorType 0xC4706431",
"CorePasteboardFlavorType 0xC4697475"
)
This listing makes me think I have some machine configuration hosed
up somewhere.
This not what I am used to seeing for pBoard types.
Google on 'CorePasteboard' doesn't seem to head anywhere useful.
Anybody got any ideas?
Steve
On Apr 27, 2007, at 3:38 PM, Glen Simmons wrote:
Doh! One of those days. Sorry for the noise.
No, you won't get a draggingEntered regardless of what you drag,
but you should get it if you drag the right thing. Try registering
for a few more types and dragging other stuff.
Glen
On Apr 27, 2007, at 3:30 PM, Steve Cronin wrote:
Glen;
Perhaps you did not see the entire message:
From: email@hidden
Subject: 'dragging Entered' never called
Date: April 27, 2007 3:21:36 PM CDT
To: email@hidden
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
On Apr 27, 2007, at 3:26 PM, Glen Simmons wrote:
On Apr 27, 2007, at 3:21 PM, Steve Cronin wrote:
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
-registerForDraggedTypes:
Glen
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden