Re: Seeking debugging advice
Re: Seeking debugging advice
- Subject: Re: Seeking debugging advice
- From: Andrew Merenbach <email@hidden>
- Date: Fri, 27 Oct 2006 17:18:08 -0700
Hi, Alan. Have you tried this, instead? The following has worked
flawlessly in all of my own programs. Note the call to -
didChangeText, which was designed, AFAIK, for times such as these:
NSString *text = [NSString stringWithContentsOfFile: @"/…"];
[textView setString: text];
[textView didChangeText];
Cheers,
Andrew
On 27 Oct 2006, at 07:19, Alan Smith wrote:
Hey David,
I've written several programs that heavily use NSTextView. In all of
them I've had to do this:
NSString *text = [NSString stringWithContentsOfFile: @"/…"];
[textView setString: @""];
[textView setString: text];
The part you should take note of is where I set the string to a blank
string. I would have a whole files worth of text in the view and then
change it to the contents of another file. If I didn't have that line
that first set the string to a blank one I would get some funky bugs.
The text on screen wouldn't change and when I tried to edit it I would
get weird errors.
Hope this helps, Alan
--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that religion really is unimportant, then it
shall evolve."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40ucla.edu
This email sent to email@hidden
_______________________________________________
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