NSFilePromisePboardType example that works with MacOSX 10.3 (also problem with pasteboard:provideDataForType:)
NSFilePromisePboardType example that works with MacOSX 10.3 (also problem with pasteboard:provideDataForType:)
- Subject: NSFilePromisePboardType example that works with MacOSX 10.3 (also problem with pasteboard:provideDataForType:)
- From: Teunis Peters <email@hidden>
- Date: Fri, 27 May 2005 06:56:18 -0700
first, the problem with pasteboard:provideDataForType: - it's only called when the program closes (???) am I missing something important here?
I'm trying to implement NSFilePromisePboardType from an NSView source... (no NOT a NSTableView. A custom NSView)
I've implemented ....
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal;
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
- (id <NSDraggingInfo>)sender;
- (id <NSDraggingInfo>)sender;
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
- (BOOL)dragPromisedFilesOfTypes:(NSArray *)typeArray
fromRect:(NSRect)aRect source:(id)sourceObject
slideBack:(BOOL)slideBack event:(NSEvent *)theEvent;
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation;
- (void)pasteboard:(NSPasteboard *)pboard provideDataForType:(NSString *)type;
The big deal with pasteboard:provideDataForType is that I'm using it to write a file from a database when asked for "NSFilenamesPboardType"
and the database is no longer available when the program closes....
Add to that, the file is never moved from a temporary location to the point it's dragged into - on say, the finder. (which usually spits out a "CFURLGetFSRef failed" message before the file is written)
Internal dragging works fine within same window. Dragging between different windows isn't yet working but I'm not too worried as I've gotten that working before. Providing a
NSTIFFPboardType works fine, creating a "Picture Clipping" file every time.
I'm just having problems with NSFilePromisePboardType and NSFilenamesPboardType. And I can live without the first - no matter how handy - because the documentation I've found online suggests it only really works well for 10.4.
To reiterate - I'm NOT USING NSTableView! Half the emails I found were rants about people asking about that. I found no example code and little helpful documentation here. I've been searching the online help on xCode 1.5 as well as google and every other search engine I could think of.
Any leads, helpful suggestions, working examples using pasteboard:provideDataForType, NSFilenamesPboardType and/or NSFilePromisePboardType would be appreciated.
Ta!
_______________________________________________
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