Newbie Pasteboard question
Newbie Pasteboard question
- Subject: Newbie Pasteboard question
- From: Björn Carlström <email@hidden>
- Date: Thu, 30 Oct 2003 22:07:55 +0100
Hi
I'm using NSTable view to drag a few items into another view.
I use this code to place the items in a plist on the pasteboard
- (BOOL)outlineView:(NSOutlineView *)olv writeItems:(NSArray*)items
toPasteboard:(NSPasteboard*)pboard
{
[pboard declareTypes:[NSArray arrayWithObjects:SCResourceType, nil]
owner:nil];
NSString* theString = [items description];
[pboard setPropertyList: theString forType: SCResourceType];
return YES;
}
When I retrieve the items after the drag is complete everything works
fine as long as the items doesn't contain any spaces or foreign
(swedish in my case) characters. What is going on? Aren't propertyLists
in unicode? If I retrieve the items as a string every character looks
okay. It's only if I put the plist in a NSArray that my problem occurs.
By the way, is there a way to put a reference to an object on the
pasteboard? Would it be safe to assume that the address of an object is
intact after a drag?
Many thanks in advance
Bjvrn Carlstrvm
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.