• 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: Document not Saving Text View Attachment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document not Saving Text View Attachment


  • Subject: Re: Document not Saving Text View Attachment
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 20 Feb 2010 13:34:44 -0800

On Sat, Feb 20, 2010 at 9:11 AM, Gordon Apple <email@hidden> wrote:
>    [store insertAttributedString:string atIndex:index];
>    NSRange range = NSMakeRange(index, 0);
>    [store edited:NSTextStorageEditedAttributes |
> NSTextStorageEditedCharacters range:range changeInLength:[string length]];

You should be doing this instead:

[store beginEditing];
[store insertAttributedString:string atIndex:index];
[store endEditing];

See the Text System Storage Layer Overview for more information.

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: Document not Saving Text View Attachment
      • From: Gordon Apple <email@hidden>
References: 
 >Document not Saving Text View Attachment (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Removing item from CollectionView by drag it out.
  • Next by Date: Re: Document not Saving Text View Attachment
  • Previous by thread: Document not Saving Text View Attachment
  • Next by thread: Re: Document not Saving Text View Attachment
  • Index(es):
    • Date
    • Thread