Re: Saving doc loses NSTextView position/selection Re: Lion autosave...
Re: Saving doc loses NSTextView position/selection Re: Lion autosave...
- Subject: Re: Saving doc loses NSTextView position/selection Re: Lion autosave...
- From: Fritz Anderson <email@hidden>
- Date: Tue, 15 Nov 2011 12:03:02 -0600
On 15 Nov 2011, at 11:02 AM, Kyle Sluder wrote:
> Don't do this. Bindings really don't understad mutable value types like NSTextStorage. This is going to call -setFoo: on your managed object, which will fire KVO, which will call -setString: on your NSTextView, which will reset the cursor position.
>
> Instead, treat the NSTextStorage as your in-memory model and only push to HTML as late as possible (probably during save).
It's obvious when you say it. Thank you.
The object in question is controlled by an NSArrayController that permits multiple selections, so this is going to be painful.
— F
_______________________________________________
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