outlineView:writeItems Mystery
outlineView:writeItems Mystery
- Subject: outlineView:writeItems Mystery
- From: Seth Willits <email@hidden>
- Date: Tue, 5 Jul 2005 16:47:30 -0700
It's a mystery to me anyway...
The problem is that in outlineView:acceptDrop:item:childIndex: even
though the pasteboard contains the type I specified, the property
list for it is nil. If I use the pizza line (below) instead, then the
property list is not nil. The item being added is never released
anywhere, so it should work... shouldn't it?
- (BOOL)outlineView:(NSOutlineView *)outView writeItems:(NSArray*)
items toPasteboard:(NSPasteboard*)pboard
{
NSMutableArray * pbItems = [NSMutableArray arrayWithCapacity:1];
NSEnumerator * enumerator = [items objectEnumerator];
id item;
while (item = [enumerator nextObject]) {
// [pbItems addObject:@"Pizza!"];
[pbItems addObject:item];
}
[pboard declareTypes:[NSArray arrayWithObject:CustomPboardType]
owner:self];
[pboard setPropertyList:pbItems forType:CustomPboardType];
return YES;
}
--
Seth Willits
_______________________________________________
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