Re: how to receive a Cocoa drag in a Carbon app using regular Drag Manager?
Re: how to receive a Cocoa drag in a Carbon app using regular Drag Manager?
- Subject: Re: how to receive a Cocoa drag in a Carbon app using regular Drag Manager?
- From: Daniel Morrow <email@hidden>
- Date: Wed, 13 Oct 2004 11:19:34 -0400
On Oct 13, 2004, at 10:39 AM, Avi Drissman wrote:
On Oct 13, 2004, at 10:22 AM, Daniel Morrow wrote:
I ask it how many items are in the dragref. It tells me 1, so far, so
good. Next I get the DragItemRef, and it oddly always has the address
"0x000C0C0A". Which is amusing. But I really need to get the data out
of it.
So just use the usual GetFlavorFlags, GetFlavorData, and the like.
Just because the DragItemRef is a funny number doesn't mean that it's
invalid.
Avi (who's written an InDesign plugin that does drag receives)
Ok, well that's fine, except when I call "CountDragItemFlavors" I get
returned 0.
Now, in Cocoa, AFAIK, there is no way to add a "flavor" with a 4-char
code to a drag.
Basically, my cocoa code looks like this:
[pboard declareTypes:[NSArray arrayWithObject:@"IsGm"] owner:nil];
BOOL result = [pboard setString:@"10111" forType:@"IsGm"];
I'm trying to pass custom data, so I'm declaring a data type "IsGm".
Then I'm adding a string, "10111" to it. This string will change to a
different block of data in the future, which is why I'm not using a
predefined type like "NSStringPboardType", because I don't want to
watch for all text being dropped on my app, I just want to watch for my
special block of data, being dropped on the app.
Anyway, when I do this, CountDragItemFlavors is always 0. I'd think it
should be 1, but this is not the case.
Thanks for any help in this matter,
-Dan.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden