Fixed incorrect comment about [NSDate distantPast]. We aren't seeking to

block for an infinite amount of time but rather to not block at all.
Also added a bit of an overview since apparently the purpose of this code
was not readily apparent even with the existing comments.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2004-10-19 04:43:03 +00:00
parent 17f3e5304f
commit eba2de69cc

View File

@@ -71,13 +71,15 @@ WX_IMPLEMENT_POSER(wxPoserNSApplication);
the queue to ensure this method will return.
See wxEventLoop::Exit() for more information.
<EFBFBD> <20>RN: We used to use nil as the untilDate in previous versions since nil
<EFBFBD> <EFBFBD>is a shorter and more concise way of specifying an infinite amount of
<EFBFBD><EFBFBD> <20>time than [NSDate distantPast]. <20>However, Apple neglects to mention in
<EFBFBD> <EFBFBD>their documentation that nil is not handled correctly in OSX 10.2
<EFBFBD> <EFBFBD>(and possibly lower) and when the call is reached the system comes to
<EFBFBD> <20>a screeching halt, therefore we need to specify [NSDate distantPast]
<EFBFBD> <EFBFBD>explicitly so that wxCocoa will work correctly in OSX 10.2.
This overridden method calls the superclass method with an untilDate
parameter that indicates nil should be returned if there are no pending
events. That is, nextEventMatchingMask: should not wait for an event.
If nil is returned then idle event processing occurs until the user
does not request anymore idle events or until a real event comes through.
Apple documentation states that nil can be passed in place of
[NSDate distantPast] to the untilDate parameter. However, according
to Ryan Norton this crashes on Jaguar (10.2).
*/
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)flag