proper declareTypes: usage.
proper declareTypes: usage.
- Subject: proper declareTypes: usage.
- From: Francisco Tolmasky <email@hidden>
- Date: Fri, 30 Jan 2004 04:27:57 -0800
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.