• 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
Re: Text attachment not deleted from NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text attachment not deleted from NSTextView


  • Subject: Re: Text attachment not deleted from NSTextView
  • From: Stéphane Sudre <email@hidden>
  • Date: Thu, 1 May 2008 18:38:03 +0200


On May 1, 2008, at 4:51 PM, Luong Dang wrote:
Hi all,

I'm having a problem with NSTextView: I programmatically insert an image attachment into an NSTextView. However, when I delete the text from my GUI the image didn't go away, even though from the code, I can see that NSAttachmentCharacter is removed from my attributed string.

Here's the code I'm using:

NSFileWrapper * fw = [[NSFileWrapper alloc] initWithPath:@"somefile.gif"];
NSTextAttachment * attachment = [[NSTextAttachment alloc] initWithFileWrapper:fw];
NSAttributedString * string = [NSAttributedString attributedStringWithAttachment:attachment];


[[textView textStorage] appendAttributedString: string];

Some additional info if they help:
* The image is an animated gif file
* I use automatic garbage collection - could it be that GC is not finalizing my objects in time?

How do you delete the text? Code or keyboard?

Couldn't it just be a refresh missing?


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Text attachment not deleted from NSTextView (From: Luong Dang <email@hidden>)

  • Prev by Date: [SOLVED] Re: FSCopyObjectASync Not Calling Callback In Cocoa
  • Next by Date: trouble debugging input method remotely
  • Previous by thread: Text attachment not deleted from NSTextView
  • Next by thread: Re: Text attachment not deleted from NSTextView
  • Index(es):
    • Date
    • Thread