• 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
Appending to a NSText Field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


--


  • Follow-Ups:
    • Re: Appending to a NSText Field
      • From: Graham Wihlidal <email@hidden>
  • Prev by Date: From View to PICT to Pasteboard
  • Next by Date: Re: Stopping a tool after launching with AuthorizationExecuteWithPrivileges
  • Previous by thread: From View to PICT to Pasteboard
  • Next by thread: Re: Appending to a NSText Field
  • Index(es):
    • Date
    • Thread