Re: Pasteboard and property lists
Re: Pasteboard and property lists
- Subject: Re: Pasteboard and property lists
- From: Chris Kane <email@hidden>
- Date: Sun, 6 Jan 2002 13:21:50 -0600
On Saturday, January 5, 2002, at 09:26 AM, Thomas Lachand-Robert wrote:
It is possible to put an array in a Pasteboard using setPropertyList?
The doc says so (even though it doesn't define "property list"), but it
doesn'
t work for me. For instance, doing that:
- (IBAction) copy:(id)sender {
NSPasteboard* pboard = [NSPasteboard generalPasteboard];
NSArray* items = [self selectedObjectsByCopy:YES];
[pboard declareTypes:FileReferencePboardTypes owner:[FileReference
class]];
/**/ [pboard setPropertyList:items forType:FileReferencePboardType];
/// [pboard setData:[items convertToData]
forType:FileReferencePboardType]
;
}
A property list is more than simply an array or dictionary or string
or .... For an array to be a property list, it can only, recursively,
contain other property lists, for example. Perhaps whatever the items
array contains, representing file references, is not a property list
type. NSURLs, for example, are not property list objects.
Chris Kane
Cocoa Frameworks, Apple