Re: Can't drag a custom data object.

2010-04-27 Thread Graham Cox
On 27/04/2010, at 5:05 PM, Billy Flatman wrote: > Hi Jens, > > Thanks for your help. I've been trying to get the option 1 approach to work, > but I don't know what I'm meant to do with my NSValue. I can't find how to > convert it to an NSData type. NSData* data = [NSKeyedArchiver archivedDat

Re: Can't drag a custom data object.

2010-04-27 Thread Billy Flatman
Hi Jens, Thanks for your help. I've been trying to get the option 1 approach to work, but I don't know what I'm meant to do with my NSValue. I can't find how to convert it to an NSData type. Thanks again, Billy. On 26 Apr 2010, at 15:46, Jens Alfke wrote: > > On Apr 26, 2010, at 5:58 AM, Bi

Re: Can't drag a custom data object.

2010-04-26 Thread Jens Alfke
On Apr 26, 2010, at 5:58 AM, Billy Flatman wrote: > I'm trying to put a custom object into past board in order to perform a drag > operation. You can’t do that, for the same reason you can’t directly write a custom object to a file. The pasteboard basically stores bytes, so it has to be able t

Can't drag a custom data object.

2010-04-26 Thread Billy Flatman
Hi all, I'm trying to put a custom object into past board in order to perform a drag operation. It's working fine if I drag a string, but if I try to pass an object, I can't get it to work. - (BOOL)outlineView:(NSOutlineView*)outlineView writeItems:(NSArray*)items toPasteboard:(NSPasteboard*)p