RE: Detecting when fetch: finishes
RE: Detecting when fetch: finishes
- Subject: RE: Detecting when fetch: finishes
- From: Ulai Beekam <email@hidden>
- Date: Thu, 4 Jun 2009 00:19:27 +0000
- Importance: Normal
What do you mean do the fetch myself? Do you mean I should not use an NSArrayController? That would sound overkill as NSArrayController plus its fetch predicate gives me a lot of functionality for free, e.g. updating dynamically when underlying objects are added/removed. Can you elaborate?
----------------------------------------
> From: email@hidden
> To: email@hidden
> Date: Wed, 3 Jun 2009 17:31:32 -0600
> Subject: Re: Detecting when fetch: finishes
>
> On Jun 3, 2009, at 5:12 PM, Ulai Beekam wrote:
>
>> I have an NSArrayController that, at the request of the user, can be
>> given a new fetch predicate. To do that I use the setFetchPredicate:
>> method. How can I detect when this predicate has been applied and
>> the appropriate fetching is done? I have not come across any
>> delegate method for it.
>>
>> I suspect that this is made tricky because of the following quote
>> from the docs under the fetch: method of NSObjectController (which
>> by the way is a superclass of NSArrayController):
>>
>> "Beginning with Mac OS X v10.4 the result of this method is deferred
>> until the next iteration of the runloop so that the error
>> presentation mechanism can provide feedback as a sheet."
>>
>> So the problem is that it finishes somewhere in the next runloop
>> iteration, making it harder to do some custom things after it
>> finishes.
>
>
> There isn't any way that I know that is more work than it is worth.
> Better to do the fetch yourself.
>
> Keary Suska
> Esoteritech, Inc.
> "Demystifying technology for your home or business"
_________________________________________________________________
Windows Liveā¢: Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009_______________________________________________
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