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

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


References: 
 >Appending to a NSText Field (From: "robert_brooke gravitt" <email@hidden>)

  • Prev by Date: RE: Dockling Menus - How do I do a submenu?
  • Next by Date: Re: Appending to a NSText Field
  • Previous by thread: Appending to a NSText Field
  • Next by thread: Re: Appending to a NSText Field
  • Index(es):
    • Date
    • Thread