On 11 Nov 2011, at 11:23 AM, Fritz Anderson wrote:

> 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.

A further update. I turned autosave off; the bug doesn't trigger in the middle 
of work, but it does trigger on File > Save. Without autosave, the selection, 
scroll, and first responder status are lost _before_ entry to dataOfType:error:.

Autosave and -commitEditing were red herrings.

I'd like to provide a better experience than this. Can somebody please suggest 
a lead?

        — F

_______________________________________________

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