Text Handling Questions
Text Handling Questions
- Subject: Text Handling Questions
- From: Nicholas Shanks <email@hidden>
- Date: Mon, 4 Mar 2002 19:52:14 +0000
I have a couple more simple Cocoa Qs for this fine list...
Pages linked from
file://localhost/Developer/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/
TextArchitecture/index.html state:
"Among other things, a text object can:
Wrap text on a word or character basis."
and:
" Using only an NSTextStorage object you can programmatically operate on
the text without incurring the overhead of laying it out for display."
I want to call -[NSMutableParagraphStyle
setLineBreakMode:NSLineBreakByCharWrapping], but can't find how to get the
NSMutableParagraphStyle object from my NSTextView. Does anyone here know
the answer?
For the second, my NSTextView subclass was using a delegate to change the
text ( setText: ) after the user typed, and returning NO to should change
text. The drawback here is this doesn't work with pasted text or the
delete key, and I can't simply manipulate the text buffer (because I don't
know how). I want delete to work one word at a time (forwards & backwards)
, not one character at a time, and when the user types any other key, I
want to be able to insert zero or more characters into multiple
NSTextViews. Any pointers?
Nicholas Shanks
--
http://nickshanks.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.