Drag and Drop to Carbon Only
Drag and Drop to Carbon Only
- Subject: Drag and Drop to Carbon Only
- From: "Erik J. Barzeski" <email@hidden>
- Date: Sun, 31 Mar 2002 16:29:18 -0500
Hi,
I'm working on a Cocoa app that's got a table view with some data in it. I
allow inter-document drag and drop with a made up Pboard type:
MyStupidDocumentDragType.
I also support NSStringPboardType and NSTabularTextPboardType. Here's a code
snippet:
NSPasteboard *pb = [NSPasteboard pasteboardWithName: NSDragPboard];
[pb declareTypes:[NSArray arrayWithObjects:NSStringPboardType,
MyStupidDocumentDragType, NSTabularTextPboardType, nil] owner:self];
[pb set
Data:archivedPeople forType:MailDropRecipientsDragType];
[pb setString:peopleAsString forType:NSStringPboardType];
[pb setString:peopleAsString forType:NSTabularTextPboardType];
Now here's the problem: I can drag and drop this text to BBEdit. To Word. To
Excel. To AppleWorks. To any other Carbon app. I can NOT drag it to
TextEdit. Or Project Builder. Or Adium. Or any other Cocoa app.
I've written drag and drop/pasteboard code before and it's worked fine. I
have another app that uses basically the same code (it only drags an
NSStringPboardType - and no, removing the other types from this example
doesn't produce proper dragging).
I've stared at this, tested a bunch of different cases, and likewise and
can't get it to work with other Cocoa apps. So what's going on? The problem,
once again: I can drag and drop to any carbon app, but no cocoa apps (other
than within this same application, that is).
Any help or leads are appreciated. Email me off-list if you wish.
--
Kindest regards,
Erik J. Barzeski
"Programming is an art form that fights back." - Anonymous
*******************************************************************
Email: erik@(anything below)
AIM: iacas ICQ: 8186546
http://barzeski.com/ http://weims.net/
http://techstra.net/ http://cocoadevcentral.com/
http://soundsetcentral.com/ http://applescriptcentral.com/
*******************************************************************
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.