• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Seeking debugging advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Seeking debugging advice (From: David Aames <email@hidden>)
 >Re: Seeking debugging advice (From: "Alan Smith" <email@hidden>)

  • Prev by Date: Best way to implement LRU cache?
  • Next by Date: Re: Best way to implement LRU cache?
  • Previous by thread: Re: Seeking debugging advice
  • Next by thread: Can I sort across a relation?
  • Index(es):
    • Date
    • Thread