Re: Inserting in a read-only NSTextView?
Re: Inserting in a read-only NSTextView?
- Subject: Re: Inserting in a read-only NSTextView?
- From: Randall Meadows <email@hidden>
- Date: Tue, 20 Apr 2004 14:17:31 -0400
At 7:29 PM +0200 4/20/04, j o a r wrote:
Read the docs. for insertText:
[snip]
It basically tells you why it doesn't work and what to do instead.
At 7:34 PM +0200 4/20/04, Stiphane Sudre wrote:
Use the text storage, probably.
At 1:38 PM -0400 4/20/04, Clark Cox wrote:
Don't use insertText:, use replaceCharactersInRange:withString: instead.
At 10:52 AM -0700 4/20/04, Douglas Davidson wrote:
As I was just saying yesterday, insertText: is
intended as the funnel point for user typing,
and is unlikely to be suitable for any other
purpose. Try a different API; for programmatic
changes it is often appropriate to work directly
with the text storage.
Thank you all very much; I remember looking at
the text storage when I first started this a week
or so ago, at which time I was also trying to
figure out how to get styled/colored text into
the view. I'm now at the point where this stuff
needs to be finished up and I guess I didn't
follow the hierarchy high enough up the tree to
figure out how to get a hold of the necessary
stuff.
This whole Cocoa paradigm is starting to make
sense now (ObjC took me about an afternoon to
grok, Cocoa itself is taking a bit longer),
thanks to members of these lists like yourselves.
--
randy <
http://www.not-pc.com/>
There are three kinds of men:
Those who learn by reading.
Those who learn by observation.
And those who just have to pee on the electric fence for themselves.
_______________________________________________
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.