Re: Loading data in a background thread and displaying it with Bindings
Re: Loading data in a background thread and displaying it with Bindings
- Subject: Re: Loading data in a background thread and displaying it with Bindings
- From: "Paulo F. Andrade" <email@hidden>
- Date: Thu, 9 Aug 2007 00:54:33 +0100
I've tried that, and couldn't get it working.
I think the problem is that my itemsArrayController is bound to the
selection.items of listArrayController. I'm using a master/detail
interface.
Programatically i've set the entityName and the fetchPredicate
(@"inList = %@", currentList) on the itemsArrayController followed by
a fetch:, but the NSTableView isn't updated.
As an update to my previous e-mail.
I said I had it working by passing all the objectIDs of objects that
where inserted and updated on the background thread to the main
thread. And then issuing a refreshObject:mergeChanges: on the main
thread to every one of those objects.
This is slow and I know I'm doing unnecessary work. As an attempt to
speed this up, I've tried issuing that refreshObject:mergeChanges:
only to "Item" objects, and it doesn't work anymore. The view isn't
updated.
I am now very confused...
<joke>
Maybe I could tell my users that the fastest way to see the changes
the background thread did is to restart the application :P
</joke>
Paulo F. Andrade 52439@IST
mailto: email@hidden
On 2007/08/09, at 00:02, mmalc crawford wrote:
On Aug 8, 2007, at 2:51 PM, Paulo F. Andrade wrote:
So... how can I tell my NSArrayController (the one bound to Items
and the NSTableView) to forget what he has and fetch everything
again? An [arrayController reload] would be great!!
fetch:?
<http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/Classes/NSObjectController_Class/Reference/
Reference.html#//apple_ref/occ/instm/NSObjectController/fetch:>
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden