• 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: Cocoa binding and threads.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa binding and threads.


  • Subject: Re: Cocoa binding and threads.
  • From: Bill Coleman <email@hidden>
  • Date: Tue, 15 Aug 2006 22:14:14 -0400


On Aug 14, 2006, at 1:18 PM, David Burnett wrote:

At the moment it all works fine except that NSTableView that displays
the values from the Entities in the Managed Context does not update on adding a new entity until either


I click on the window.
Move the mouse over a control that changes the cursor.
Change focus on/off the window.

I just asked this question recently, although I wasn't using threads, I was using a tail-recursive loop to perform a concurrent operation.


I've tried calling

[flameTable performSelectorOnMainThread:@selector (setNeedsDisplay) withObject:nil waitUntilDone:YES];

[flameTable performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES];


[oxidizerWindow performSelectorOnMainThread:@selector (makeKeyAndOrderFront:) withObject:self waitUntilDone:YES];

at the end of AddRandomGenomeToFlamesUsingContext, all to
no effect, so now I'm totally stumped.

The problem isn't the NSTable. Using reloadData doesn't work because the NSArrayController it is bound to hasn't recognized the data yet.


Get the NSArrayController that flameTable is bound to and send it a processPendingChanges message.

Bill Coleman, AA4LR, PP-ASEL        Mail: email@hidden
Quote: "We invented personal computing."
            -- Bill Gates @ TechNet / MSDN 2003


_______________________________________________ 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: Cocoa binding and threads.
      • From: David Burnett <email@hidden>
    • Re: Cocoa binding and threads.
      • From: David Burnett <email@hidden>
References: 
 >Cocoa binding and threads. (From: David Burnett <email@hidden>)

  • Prev by Date: Re: Unit testing and Xcode integration
  • Next by Date: Re: Unit testing and Xcode integration
  • Previous by thread: Cocoa binding and threads.
  • Next by thread: Re: Cocoa binding and threads.
  • Index(es):
    • Date
    • Thread