• 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: CD/Bindings and NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CD/Bindings and NSTextView


  • Subject: Re: CD/Bindings and NSTextView
  • From: Adam Knight <email@hidden>
  • Date: Mon, 26 Dec 2005 10:37:35 -0600

On Dec 26, 2005, at 3:30 AM, mmalcolm crawford wrote:

On Dec 26, 2005, at 12:58 AM, Adam Knight wrote:

Is there a better way to do this? I need to be able to set the selection of a text view in a split view right after bindings has changed the content of the text view, but everything I do happens too soon. I even tried to use perform/delay in method #2 but the selection data I had was of the previous entry because the change hadn't happened yet.

It's not clear to me what you have set up and what you're trying to achieve.

mmalc

Again, I'm trying to save and restore the selection information for the various entries in my document (similar to how Xcode keeps your selection when you change source files).

When a new item is selected I want to save the currently-selected information (-[NSTextView selectedRanges]), let bindings change the information in the text view, and then after that change I want to restore the selection of the item it just switched to. The first part I have with textDidEndEditing: and then bindings changes the content of the text view. That latter part is giving me a problem as I can't find an event to wait for or get notified on that happens after the change has completely happened; everything I wait for either happens before the change is complete or never gets triggered in time.

I tried using the textDidBeginEditing: notification, but that doesn't get triggered when content changes, just when you click inside the view or after you start typing if you tab to it. The various things I've attached to with KVO seem to happen before the change for some reason.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: CD/Bindings and NSTextView
      • From: Jérôme Jaglale <email@hidden>
References: 
 >CD/Bindings and NSTextView (From: Adam Knight <email@hidden>)
 >Re: CD/Bindings and NSTextView (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: NSTitlebar?
  • Next by Date: Newbie Confusion: Bindings & NSTextField
  • Previous by thread: Re: CD/Bindings and NSTextView
  • Next by thread: Re: CD/Bindings and NSTextView
  • Index(es):
    • Date
    • Thread