- Declared In:
- NSPasteboard+Extensions.h
TypecheckHandling objects
- - containsType:
Handling references
- - setObject:forType:
- - objectForType:
- - setObjectByReference:forType:
- - objectByReferenceForType:
- (BOOL)containsType:(NSString *)type
Returns YES if type is one of the types available on the pasteboard.
- (id)objectByReferenceForType:(NSString *)pboardType
Returns the object stored by reference on the pasteboard. This method can return invalid object references as it does not (and cannot) ensure the corresponding object has not been deallocated while the reference was on the pasteboard.
- (id)objectForType:(NSString *)pboardType
Unarchives the object stored with the type specified using the standard NSUnarchiver. This effectively copies the original object.
- (void)setObject:(id)object forType:(NSString *)pboardType
Archives the object using the standard NSArchiver and stores it with the type specified.
- (void)setObjectByReference:(id)object forType:(NSString *)pboardType
Saves a reference to the object on the pasteboard. This is in form of a pointer and, hence, can only be used in the same process space. Note also, that the object must be retained externally until its reference is removed from the pasteboard.