• 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
cut and paste: how to use declareTypes:owner:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cut and paste: how to use declareTypes:owner:?


  • Subject: cut and paste: how to use declareTypes:owner:?
  • From: Niko Matsakis <email@hidden>
  • Date: Thu, 5 Jun 2003 17:05:51 -0400 (EDT)

I see that I can when I send the 'declareTypes:owner:' message to the
pasteboard, I can send in an object as the owner of the data.

The text says that this way I can post only the representations of the
data I expect to be used, but will have the option to convert to the other
representations by being sent a pasteboard:provideDataForType: message
when it is needed. This sounds like something I want to do.

I am scared, though, of providing an owner! The documentation warns
that, "It should not, for example, be the NSView that displays the data
if that NSView is in a window that might be closed."

What the heck! What window might not be closed? I mean, the application
could quit before the data is pasted! I must be missing something because
this scheme seems guaranteed to give you a stale pointer.

In this case, the owner I want to provide is a field of the document
being copied from, so it will live as long as the document does, but I
can't see what would prevent the user from closing the document.


niko
_______________________________________________
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: Re: TextView problem
  • Next by Date: Screen Capture
  • Previous by thread: Re: TextView problem
  • Next by thread: Screen Capture
  • Index(es):
    • Date
    • Thread