Dragging an NSImage from an NSTextView?
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