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
Saving the text selection with master/detail view and bindings
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Saving the text selection with master/detail view and bindings
Subject
:
Saving the text selection with master/detail view and bindings
From: Adam Knight <
email@hidden
>
Date: Sat, 7 Jan 2006 14:39:13 -0600
I have a master/detail view with an NSTextView as one of the detail items. As the item is changed I'd like to retain the selected text and cursor position in the text view.
When the selected item is changed I can successfully save the selection with selectedRanges called from textDidEndEditing. I can't, however, seem to find a way to find out when bindings has finished changing the NSTextView's content so that I can set the selected ranges for the next item.
I've tried:
* KVO on the NSArrayController's selectionIndexes property (triggers before the change is finished)
* textDidBeginEditing (doesn't trigger until I click in the text view)
So how can I tell when bindings has finished updating the NSTextView so that I can set the selected ranges again? What triggers _after_ the change? Should I just do the hackish thing and do a delayed action after the KVO triggers (yuck)?
_______________________________________________
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
:
NSArrayController insertObject:atArrangedObjectIndex: not working as expected
From:
"douglas a. welton" <email@hidden>
Re: Saving the text selection with master/detail view and bindings
From:
Camillo Lugaresi <email@hidden>
Prev by Date:
NSAttributedString: lossy attachments when serializing/archiving?
Next by Date:
Re: Saving the text selection with master/detail view and bindings
Previous by thread:
Re: NSAttributedString: lossy attachments when serializing/archiving?
Next by thread:
Re: Saving the text selection with master/detail view and bindings
Index(es):
Date
Thread