Re: Appending to a NSText Field
Re: Appending to a NSText Field
- Subject: Re: Appending to a NSText Field
- From: Graham Wihlidal <email@hidden>
- Date: Wed, 11 Jul 2001 13:02:23 -0600
I would use an NSTextView so you can use the insertText function to
append text to the end of the control. Using NSTextField doesn't seem
to want to use scrollbars if the text goes past the bounds.
Hope that helps,
Graham
I'm trying to implement a simple logging function in my app, but do not
know exactly how to handle it. I want to capture messages from my app
and display them in this log window, kinda like Console.app does. I'm
using Java and am currently using a NSTextField, which means I have to
do something like this:
String tempData, theMessage;
NSTextField theTextField
....
tempData = theTextField.stringValue();
theMessage = "Socket data returned is: " + someData + "\n" ;
System.out.println(theMessage);
theTextField.setStringValue(tempData + theMessage);
....
Isn't there away to just append? Should I be using NSTextViews instead?
How would I do it that way??
Thanks,
Brooke
--
--------------------------------------------
brooke(at)gravitt.org
--
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev