• 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
Bindings do not work in threads?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bindings do not work in threads?


  • Subject: Bindings do not work in threads?
  • From: Theo Vosse <email@hidden>
  • Date: Wed, 12 Oct 2005 11:25:49 +0200

Hi,

I've got an application that runs some evaluation in a thread (via detachNewThreadSelector). If that new thread updates a variable that has a binding in the (current) view (an NSTabViewItem), strange things happen.

1. If the update is made at the end of the new thread (i.e. just before termination), the change is not displayed. When I change to another tab and then back, it can be seen.
2. If the update is made regularly in the new thread, I can sometimes see two different values, overlapping each other.


It seems that both threads are trying to update the bindings themselves, instead of just letting the main thread do that. Is that correct? If so, is there another solution than having some kind of poll/wait loop in the main thread?

    Theo Vosse
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Bindings do not work in threads?
      • From: Chris Hanson <email@hidden>
    • Re: Bindings do not work in threads?
      • From: Julien Jalon <email@hidden>
  • Prev by Date: Re: No Reference to Table Column
  • Next by Date: Re: Spotlight view
  • Previous by thread: Re: NSBezierPath bugs? (Contains point and fill)
  • Next by thread: Re: Bindings do not work in threads?
  • Index(es):
    • Date
    • Thread