Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Custom pasteboard types?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom pasteboard types?



I've got a view that's both a drag source and drag destination. Dragging to and from other objects (where I've used delivered pasteboard types like PBTIFFPboardType) works fine, dragging from one of these views to another one of them, however, doesn't work.

What I've tried to do is to declare a custom Pasteboard type, which I can use to copy all attributes between two views of the same kind. Using the type seems to work - I'm able to put objects on the pasteboard using it, and when I retrieve the list of types from the pasteboard, the type shows up as available.

But no matter what I do, the object I put on the pasteboard doesn't come through. It's an NSDictionary, and it's not nil, but I get a nil object on the other end of the drag. This happens if I use setPropertyList:forType: setData:forType: (archiving the data with an NSKeyedArchiver) or setString:forType.

Can anyone think of what I might be doing wrong? Is it acceptable to declare custom pasteboard types like this?

Thanks,
Jeff
_______________________________________________
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




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.