Re: Cocoa binding and threads.
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