Creating a console view
Creating a console view
- Subject: Creating a console view
- From: Rick Mann <email@hidden>
- Date: Tue, 16 Mar 2010 18:19:56 -0700
Some time ago, I created a little console in my app, displaying characters received on a serial port. For the life of me, I can't find that app to see how I did it.
I'm currently using an NSTextView, and calling the following to append text:
NSString* existingText = self.output.string;
NSRange r = NSMakeRange(existingText.length, 0);
[self.output replaceCharactersInRange: r withString: s];
r = NSMakeRange(existingText.length, 0);
[self.output scrollRangeToVisible: r];
[self.output setNeedsDisplay: true];
The problem is that it doesn't always show up. I still have to mouse over the area before it'll display (sometimes).
Can anyone offer suggestions on how I can improve this behavior? Note: I like NSText view because I can style the text.
Thanks!
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden