Re: Lion autosave loses NSTextView position/selection
Re: Lion autosave loses NSTextView position/selection
- Subject: Re: Lion autosave loses NSTextView position/selection
- From: Fritz Anderson <email@hidden>
- Date: Fri, 11 Nov 2011 11:23:50 -0600
On 11 Nov 2011, at 11:00 AM, Fritz Anderson wrote:
> My application writes an XML document that includes styled text in the form of HTML. At the user end is an NSTextView; I use an in-memory Core Data store for working storage. The text view is bound to the backing NSManagedObject through an NSArrayController. I have an NSValueTransformer subclass between the text view and the array controller to translate between the attributed string and NSData containing the HTML.
...
> Snatching the user's work from under his hands is a horrible experience. How can I fix this?
I hate it when people rapid-fire updates to their questions, but…
Removing the value transformer from the NSArray controller process between the text view and the model object doesn't help.
In my model object, I added an NSAttributedString-valued on-demand @property; the getter and setter rely on the transformer to get and set the HTML string** CD attribute. The value still transits through the transformer, but I hoped that hiding it from the controller might help.
It didn't. I still have the bug.
— F
** (I earlier said the CD attribute was NSData; in fact, it's NSString. Sorry.)
_______________________________________________
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