• 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: Saving doc loses NSTextView position/selection Re: Lion autosave...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving doc loses NSTextView position/selection Re: Lion autosave...


  • Subject: Re: Saving doc loses NSTextView position/selection Re: Lion autosave...
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 15 Nov 2011 09:02:29 -0800

On Nov 15, 2011, at 8:46 AM, Fritz Anderson <email@hidden> wrote:

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

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

--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: Saving doc loses NSTextView position/selection Re: Lion autosave...
      • From: Fritz Anderson <email@hidden>
References: 
 >Lion autosave loses NSTextView position/selection (From: Fritz Anderson <email@hidden>)
 >Re: Lion autosave loses NSTextView position/selection (From: Fritz Anderson <email@hidden>)
 >Saving doc loses NSTextView position/selection Re: Lion autosave... (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: About iVars declaration and property
  • Next by Date: Re: Troubles with Bold and Italic fonts - Cocoa
  • Previous by thread: Saving doc loses NSTextView position/selection Re: Lion autosave...
  • Next by thread: Re: Saving doc loses NSTextView position/selection Re: Lion autosave...
  • Index(es):
    • Date
    • Thread