Sorry to reply to my own message, but does anybody
have any advice on/knowledge about this? I have gone
ahead and changed my word count to be based on
-nextWordFromIndex:forward, and everything seems to be
working nicely (and it seems more accurate). But I do
want to be positive, given the documentation's warning
that this method is not intended for "linguistic
analysis", that I'm not going to be breaking anything
here... Hopefully not, seeing as, as I mentioned, an
Apple text expert suggested this method elswhere -
http://www.cocoabuilder.com/archive/message/2004/6/10/109459
- but like I say, I would like to be sure.
Many thanks,
Keith
--- ORIGINAL MESSAGE ---
Hello,
I have a word count feature in my text editing app
which is based on parsing whitespace. This works well,
but it has been brought to my attention that this will
not work for languages like Japanese. Although I
probably won't be localising any time soon, I don't
want to limit my app to certain languages.
NSAttributedString's -nextWordFromIndex:forward:
method looks like the perfect solution for this.
However, the docs seem to suggest that this method
should *not* be used for word counts:
"This method is intended for moving the insertion
point during editing, not for linguistic analysis or
parsing of text."
On the other hand, I found a previous post on this
list asking about word counts, and Douglas Davidson,
the Apple text system guru, suggesting this method for
precisely this purpose.
Does anybody have a solution/answer to this? Is it
okay to use -nextWordFromIndex:forward: for a word
count (and a live word count at that)? If not, what
problems does this cause? And also if not, does
anybody have a word count solution that isn't limited
to certain languages (which would presumably need to
come from Appkit language analysis methods...).
Many thanks for any advice,
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