My Cocoa app has a debug mode that displays additional window in which I'd like to present NSLog output (just like the Console window in Xcode). I already have a custom NSlog method, which saves the output to a file as well. Which control should I use NSTextView? How to append the text inside it with a new line? The log may be long so it needs to be efficient too. Any ideas?
Asked
Active
Viewed 171 times
0
-
Use a NSTextView, and each time that you print something with your customized log function, you append it to the text view (use a mutable string). – Ramy Al Zuhouri Oct 30 '12 at 14:26
1 Answers
0
I would use NSTextView. It would be easiest and most efficient.
[myTextView insertText: [NSString stringWithFormat: @"%@\r\n", yourStringTOAppend]];

brightintro
- 1,016
- 1
- 11
- 16

Richard Williamson
- 154
- 8