Re: Dragging still not working
Re: Dragging still not working
- Subject: Re: Dragging still not working
- From: Chuck Pisula <email@hidden>
- Date: Wed, 23 May 2001 10:05:35 -0700
I have some code that puts strings on the pasteboard and TextEdit picks
it up just fine, once I added the following to my own NSTableView
subclass:
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal {
if (isLocal) return NSDragOperationEvery;
else return NSDragOperationCopy;
}
Basically if you don't do this only drags within your application are
allowed.
-chuck
On Saturday, May 19, 2001, at 04:44 PM, Will Price wrote:
I have an NSOutlineView. In my outlineView:writeItems:toPasteboard:
method to support dragging, I have the following two lines(only):
[pboard declareTypes:[NSArray arrayWithObjects:NSStringPboardType, nil]
owner:self];
[pboard setString:[NSString stringWithCString:"test"
forType:NSStringPboardType];
If I drag an item from my NSOutlineView to any other application such
as Mail or TextEdit, they do not accept or visibly validate the drag.
I have tried so many things to try to fix this. I've tried adding every
single type in NSPasteboard.h to the declareTypes method for instance.
Note that my own view does accept the drags, and I can get limited
success by adding the Filenames type at which point I can drag to
Carbon apps such as the Finder but no Cocoa apps (yes this is really
weird).
What are these other applications looking for?? I'd be happy to provide
it if only someone would reveal the secret. If I drag from Mail or
TextEdit *to* my app, I see that they provide:
NeXT Rich Text Format v1.0 pasteboard type
NSStringPboardType
NeXT smart paste pasteboard type
NeXT plain ascii pasteboard type
CorePasteboardFlavorType 0x52544620
CorePasteboardFlavorType 0x54455854
CorePasteboardFlavorType 0x7374796C
What are these other secret types at the bottom and do I need to
provide them as well for this to work?
Thanks!
-- Will
Will Price, Director of Engineering
PGP Security, Inc.
a division of Network Associates, Inc.
_______________________________________________
MacOSX-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/macosx-dev