Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

proper declareTypes: usage.



The docs say you should not set owner: to something fleeting, that could disappear and thus when asked for the proper pboard type not be able to respond. I have an NSImageView subclass and I am trying to implement copy. Currently I just say [pboard declareTypes: [NSArray arrayWithObjects: NSTIFFPboardType, nil] owner: nil] then I immediately set the data: [pboard setData: [[self image] TIFFRepresentation] forType: NSTIFFPboardType]. However, I would like to provide several options, speficially I would like to send declareTypes [NSImage imageUnfilteredPasteboardTypes]. The problem is, I don't know what owner to set, let alone how to convert to all those different types. I was thinking of setting the owner to a Class that way it is independent of any object which may be released, but after the app quits then I'm still left with nothing correct? So my question is twofold: what is the best way to implement copy and how do I convert to all those different types.

Thanks in advance,

Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
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.



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.