• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
proper declareTypes: usage.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Objective C language [NEWBEE QUESTIONS]
  • Next by Date: Re: How to use a class, which may not be available
  • Previous by thread: Re: Objective C language [NEWBEE QUESTIONS]
  • Next by thread: Using NSScrollView at run time
  • Index(es):
    • Date
    • Thread