Improve documentation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14911 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2002-11-03 19:09:39 +00:00
parent d76c484957
commit 5d30f03b94

View file

@ -778,8 +778,8 @@ static NSDate *theFuture;
* an argument, but does so in the main thread of the program. The receiver * an argument, but does so in the main thread of the program. The receiver
* and anObject are both retained until the method is performed. * and anObject are both retained until the method is performed.
* </p> * </p>
* <p>The selector is performed when the runloop of the main thread is in * <p>The selector is performed when the runloop of the main thread next
* one of the modes specified in anArray, or if there are no modes in * runs in one of the modes specified in anArray. if there are no modes in
* anArray, the method has no effect and simply returns immediately. * anArray, the method has no effect and simply returns immediately.
* </p> * </p>
* <p>The argument aFlag specifies whether the method should wait until * <p>The argument aFlag specifies whether the method should wait until
@ -852,25 +852,21 @@ static NSDate *theFuture;
/** /**
* Invokes -performSelectorOnMainThread:withObject:waitUntilDone:modes: * Invokes -performSelectorOnMainThread:withObject:waitUntilDone:modes:
* using the supplied arguments and an array containing common modes. * using the supplied arguments and an array containing common modes.<br />
* These modes consist of NSRunLoopMode, NSConnectionreplyMode, and if
* in an application, the NSApplication modes.
*/ */
- (void) performSelectorOnMainThread: (SEL)aSelector - (void) performSelectorOnMainThread: (SEL)aSelector
withObject: (id)anObject withObject: (id)anObject
waitUntilDone: (BOOL)aFlag waitUntilDone: (BOOL)aFlag
{ {
static NSArray *commonModes = nil;
if (commonModes == nil)
{
commonModes = [[NSArray alloc] initWithObjects:
NSDefaultRunLoopMode, NSConnectionReplyMode, nil];
}
[self performSelectorOnMainThread: aSelector [self performSelectorOnMainThread: aSelector
withObject: anObject withObject: anObject
waitUntilDone: aFlag waitUntilDone: aFlag
modes: commonModes]; modes: commonModes()];
} }
@end @end
typedef struct { @defs(NSThread) } NSThread_ivars; typedef struct { @defs(NSThread) } NSThread_ivars;