• 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: NSTextField overwrites itself
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField overwrites itself


  • Subject: Re: NSTextField overwrites itself
  • From: Julian Barkway <email@hidden>
  • Date: Sat, 18 May 2002 07:53:31 +0200

On Friday, May 17, 2002, at 10:29 pm, Mark Slater wrote:

I'm trying to implement a window that monitors a thread. Sometimes it all looks good, but more often than not, the NSTextFields on the window will overwrite themselves... you can make out the current value and one or more previous values. The thread processes data in batches, and at the end of each batch, it sends an update notification to the window controller class. There is generally 1-5 seconds between updates... sometimes longer but rarely shorter... and they don't ever seem to overlap. Is there some kind of trick in changing the text field string that ensures only the current value is drawn and the old value is erased first?

The Window containing the fields is set to Buffered in IB. Also, I'm not able to turn on "Draws Background" for the NSTextFields.

Thanks in advance!

Mark

I had a similar problem with a progress indicator I was updating from inside a thread. The answer is to insert:

[[NSRunLoop currentRunLoop] run];

near the start of your threaded section and all should be well.

--------------------------------------------------------------------------------------------------
Julian Barkway
email@hidden
Zurich,
Switzerland
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSTextField overwrites itself (From: Mark Slater <email@hidden>)

  • Prev by Date: Re: Dock Magnification Effect
  • Next by Date: Re: getpeername()
  • Previous by thread: NSTextField overwrites itself
  • Next by thread: Re: NSTextField overwrites itself
  • Index(es):
    • Date
    • Thread