Appending to a NSText Field
Appending to a NSText Field
- Subject: Appending to a NSText Field
- From: "robert_brooke gravitt" <email@hidden>
- Date: Wed, 11 Jul 2001 14:42:01 -0400
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
--