Re: NSOutlineView as dragging destination for promised files
Re: NSOutlineView as dragging destination for promised files
- Subject: Re: NSOutlineView as dragging destination for promised files
- From: Wain <email@hidden>
- Date: Mon, 14 Nov 2005 22:43:55 +0000
On 14 Nov 2005, at 20:04, Patrick Gleichmann wrote:
My dragging source contains the following code:
[self dragPromisedFilesOfTypes:[NSArray arrayWithObject:@"jpg"]
fromRect:dragLoc source:self slideBack:TRUE event:ev];
and
- (NSArray*)namesOfPromisedFilesDroppedAtDestination:(NSURL*)
dropDestination {
// NSLog(@"namesOf.. %@", dropDestination);
return [NSArray arrayWithObject:@"test.jpg"];
}
Now I have a delegate for a NSOutlineView - dragging destination -
that contains
- (NSDragOperation)outlineView:(NSOutlineView*)outlineView
validateDrop:(id<NSDraggingInfo>)info
// The usual checks..
return NSDragOperationCopy;
The "outlineView:validateDrop:" method is called, but where and how
am I supposed to call the
"namesOfPromisedFilesDroppedAtDestination:" of the dragging source?
Thanks alot,
Patrick
Look at the documentation for <NSDraggingInfo> protocol.
"- (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)
dropDestination" is intended to be called from the operations defined
within < NSDraggingDestination> protocol which (almost) all contain
an "(id <NSDraggingInfo>) sender", messages should be sent to this
object.
Hope this helps.
Wain
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
_______________________________________________
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