Re: Event loop expiration date insight
Re: Event loop expiration date insight
- Subject: Re: Event loop expiration date insight
- From: Greg Parker <email@hidden>
- Date: Tue, 30 Oct 2012 23:56:24 -0700
On Oct 30, 2012, at 9:58 PM, Graham Cox <email@hidden> wrote:
> I'm wondering what is the usual correct thing to pass for the 'untilDate' parameter. For a long time I've been using [NSDate distantFuture], but the documentation of this method says that by passing nil it uses [NSDate distantPast], which implies perhaps that this is a more usual default. In thinking about this I realise I don't really understand what this parameter is doing, especially when 'distantPast' is specified - does that mean do not wait at all for any events and only return one if it's already queued?
If the date is in the past then the method returns immediately. If there is a matching event in the queue then it will be returned.
> I've changed this to pass nil and my mouse dragging works as normal.
This is generally not recommended. Using nil instead of -distantFuture may use more CPU and power while the drag is in progress.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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