Re: NSOutlineView Dazed and Confused for Drag and Drop
Re: NSOutlineView Dazed and Confused for Drag and Drop
- Subject: Re: NSOutlineView Dazed and Confused for Drag and Drop
- From: Dave DeLong <email@hidden>
- Date: Wed, 15 Sep 2010 10:48:56 -0600
I wrote a simple project to show basic drag-and-drop in an NSOutlineView, available here:
http://davedelong.com/downloads
HTH,
Dave
On Sep 15, 2010, at 10:35 AM, email@hidden wrote:
> I do this in awakeFromNib (self is subclass of NSOutlineView);
>
> [self registerForDraggedTypes:[NSArray arrayWithObjects:NSDragPboard,nil]];
>
> I implement in the data source:
>
> - (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard {
>
> First question.
>
> items is an array of pointers to my outline view items ... how do I put them on the pboard?
>
> Next question.
>
> My validate and accept drop methods are not called. Is this because there is no data on the pboad (see above question as I haven't put the items on the pboard).
>
> Last question.
>
> The outline view will not auto scroll ... I am not seeing any property to specify this. How do I make the outline view auto scroll when dragging around?
>
>
> -koko
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden