Paul,
You're quite right. I commented out the call to shouldChangeTextInRange: and
my code still does what I want. Thanks for pointing this out.
I'll have a look at the documentation on methods for bracketing multiple
changes to the text (after I get my head around efficiently creating trian
> /** ADDED CODE **/
> NSMutableDictionary* typingAttributes = [[myTextView typingAttributes]
> mutableCopy];
> [typingAttributes setObject:paraStyle forKey:NSParagraphStyleAttributeName];
> [myTextView setTypingAttributes:typingAttributes];
> NSRange rangeOfChange = NSMakeRange(0, [[myTextView st
> When my application opens a text file, the insertion point is blinking
> immediately after the last character on the last line. If I then hit the tab
> key, the insertion point moves over the correct distance. However, if I hit
> the return key when the file is first opened, the insertion po
Thanks, Ross and Paul, I've finally got things working the way I wanted.
Here's what my code now looks like (in case someone else has a similar problem):
- (void)updateView {
[[self textView] setString:[self string]]; // replaced textView
with [self textView] 6-8-06
NSText
On Jun 5, 2010, at 1:09 AM, Boyd Collier wrote:
> In an application I'm working on, I read in plain text files containing data
> to be analyzed. This uses a slightly-modified version of MyDocument.m that
> is produced as a result of starting a project with the template for
> NSDocument archite
In an application I'm working on, I read in plain text files containing data to
be analyzed. This uses a slightly-modified version of MyDocument.m that is
produced as a result of starting a project with the template for NSDocument
architecture. The modification that I made was to add a method