• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
outlineView:writeItems Mystery
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: outlineView:writeItems Mystery
      • From: Seth Willits <email@hidden>
  • Prev by Date: How to create background window that can't get focus
  • Next by Date: Re: Catching system-level exceptions with NS_DURING
  • Previous by thread: How to create background window that can't get focus
  • Next by thread: Re: outlineView:writeItems Mystery
  • Index(es):
    • Date
    • Thread