• 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
Rapid use of NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rapid use of NSTextField


  • Subject: Rapid use of NSTextField
  • From: Justin Bakse <email@hidden>
  • Date: Sun, 18 Apr 2004 14:49:30 -0500

Hello,
I am working on a project that changes the content of and focus of user editable NSTextFields programaticly. I've noticed that if i rapidly (say 2 dozen times a second) cycle the focus of the the fields sometimes my program stops responding (freezes).

I get this message:
Unlocking Focus on wrong view (<NSView: 0x3338c0>), expected <MyTextField: 0x335d10>

Also, just using [MyNSTextField setIntValue:targetValue]; quickly can cause my program to freeze. I've tested this with just calling setIntValue 4 times in a row in a single call to a function, and this causes a freeze.

An important (i think) factor is that i am doing these changes from a seperate thread, actually they are called as a result of a midi input port proc.

I have reduced the problem by moving the changes to a seperate thread that only updates fields every 1/4 second, based on a variable set in the other thread, but that is sort of messy.

Are there any special precautions i should be using working with NSTextfields (or controls in general) in a threaded app? Any thing else come to mind?

Thankyou -justin
_______________________________________________
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.


  • Follow-Ups:
    • Re: Rapid use of NSTextField
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Rapid use of NSTextField
      • From: DevLists <email@hidden>
    • Re: Rapid use of NSTextField
      • From: Bob Ippolito <email@hidden>
  • Prev by Date: Re: NSObjectController and NSDefaultsController Binding?
  • Next by Date: Re: Rapid use of NSTextField
  • Previous by thread: NSMenuItem Key Equivalents, keyDown events, and system beeps
  • Next by thread: Re: Rapid use of NSTextField
  • Index(es):
    • Date
    • Thread