TextView and attachments
TextView and attachments
- Subject: TextView and attachments
- From: Renaud Boisjoly <email@hidden>
- Date: Tue, 2 Jul 2002 09:31:15 -0400
Hi all
Being a enwbie, I'm still findig it quite hard to understand all the
implications of the TExt system in Cocoa. Here's my current issue, and
I've tried to find solutions to this in the archives and documentation
to no avail... certainly due to my lack of understanding of the whole
thing...
I have a simple app which contains a TextView and I'm trying to
implement Drag and Drop and Copy/Paste to support the copying of images
dragged into the TextView.
I've got all this to work fine, as long as the document is saved. If I
save, I can have access to the cell's image, or the wrapper's filename
without problem.
- (BOOL)textView:(NSTextView *)view writeCell:(id
<NSTextAttachmentCell>)cell atIndex:(unsigned)charIndex
toPasteboard:(NSPasteboard *)pboard type:(NSString *)type
is what I'm using, its fine.
But if the document is not saved, or if images have been moved around in
some ways before I drag and drop into another app, I either get the
wrong image, or nothing at all. I cannot refer to the filewrapper since
it doesn't exist yet.
I seem to recall mentions of saving temp versions of either the document
or graphic in /tmp or something, but I cannot find this anywhere anymore.
All I want is for my app to be able to drag an image even if a document
was not saved before... but even TextEdit doesn't do this...
Any ideas on what I should be looking into to master this concept?
Thanks for all your help
Renaud Boisjoly
_______________________________________________
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.