• 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
Getting NSTIFFPboardType data from an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting NSTIFFPboardType data from an NSTextView


  • Subject: Getting NSTIFFPboardType data from an NSTextView
  • From: Keith Blount <email@hidden>
  • Date: Tue, 28 Sep 2004 10:51:24 -0700 (PDT)

Apologies for asking a similar question to one I
posted a few days ago, but I received no replies and
have still made no progress with this one...

I have an NSTextView and (a subclass of) NSImageView
alongside one another in my app. Currently the user
can drag an image from the image view into the text
view, but I would also like the user to be able to
drag an image from the text view  into the image view,
which is far more challenging - to the extent that I
haven't figured out how to do this part yet.

If you drag an image from an NSTextView, it seems that
it is only the image that is dragged - for instance,
if you try to drag an image and text together, it
looks as though only the image is dragged - but the
type placed on the pasteboard is still
NSRTFPboardType. I need the NSTextView to paste
NSTIFFPboardType and provide the data for the image if
an image is dragged.

I have searched the archives and the only posts that
come anywhere near have gone unanswered. I know that
the images in an NSTextView are actually text
attachments stored as tiff files inside the file
wrapper, and have found some methods in the docs which
look useful (namely
textView:writeCell:atIndex:toPasteboard:type: and the
like), but have no idea where to start to get this
work - experimentation has so far been fruitless.

If anybody could give me any pointers I would be
really grateful.

Many thanks,
Keith



__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Carbon sheet making my Cocoa window unmovable
  • Next by Date: binding (converting call from Objective-C to Java
  • Previous by thread: Re: Curreny Converter Simple Question
  • Next by thread: Re: Getting NSTIFFPboardType data from an NSTextView
  • Index(es):
    • Date
    • Thread