Hold off guys.  I'm getting a s--- load of console messages from a related
dynamically loaded menu and possibly an exception thrown.  Let me deal with
that and see if the problem persists.

=================================
Like I said in the post, I tried that.  Same result.  Just to make sure it
had nothing to do with the attachment character, I also tried the following
and got the same result:

    [store beginEditing];
    [store insertAttributedString:[[NSAttributedString alloc]
initWithString:@"$"] atIndex:index];
    [store endEditing];

The edit works, but it's just not committing the result.  If I type another
character elsewhere, then it saves both correctly.

On 2/20/10 3:34 PM, "Kyle Sluder" <kyle.slu...@gmail.com> wrote:

> On Sat, Feb 20, 2010 at 9:11 AM, Gordon Apple <g...@ed4u.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to