• 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
Dragging an NSImage from an NSTextView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dragging an NSImage from an NSTextView?


  • Subject: Dragging an NSImage from an NSTextView?
  • From: Keith Blount <email@hidden>
  • Date: Sat, 25 Sep 2004 08:16:58 -0700 (PDT)

Hello,

I am working on an app that has a subclass of
NSImageView at the top of the main window and a
subclass of NSTextView at the bottom. The user can
resize the image in the image view by zooming in and
out, and drag the image (maintaining its zoom) into
the text view if he or she so wishes. However, I would
like this to work both ways, so that the user can drag
an image *out* of the text view and into the
NSImageView for resizing or examining.

I am a little stumped on how to do this. 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 in
order to get this work - experimentation so far has
been fruitless.

Does anybody have any suggestions on how I might go
about this? I would really appreciate any pointers to
get me started.

Many thanks,
Keith



__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
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: How to draw a rectangle in a NSView
  • Next by Date: Re: Multiple Inheritence (Was: Is _objc_flush_caches_(Class) necessary to swizzle methods?)
  • Previous by thread: Re: NSImage doesn't accept background color?
  • Next by thread: I can capture stderr but can't capture stdout... unless debugging?
  • Index(es):
    • Date
    • Thread