NSTextView's "Replace All" issues
NSTextView's "Replace All" issues
- Subject: NSTextView's "Replace All" issues
- From: Keith Blount <email@hidden>
- Date: Tue, 4 Jul 2006 11:31:42 -0700 (PDT)
Hi,
I have an NSTextStorage subclass that is built from
several text storages and handles keeping them in
sync. All works fine. However, it somewhat relies on
NSTextView's delegate method,
-textView:shouldChangeTextInRanges:replacementStrings:,
returning NO when the user is trying to edit a range
that traverses more than one component text storage.
(This is the behaviour I want, as each component is
really a discrete document and I don't want to try to
second-guess the user's intentions in this instance.)
Unfortunately, this screws up the find panel's Replace
All action when trying to replace a word that occurs
in several components. This is because during a
Replace All operation, the text view's delegate method
is only called once, with a union of all the ranges to
be replaced (which can therefore traverse the range of
more than one component even if each individual
replacement range does not) rather than separately for
each range that is to be updated.
Does anybody know if there is any way around this?
Thanks,
Keith
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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