This is NSRunLoop.rtf in view mode; [Download] [Up]
paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc. All Rights Reserved. s4 li100 fi0 ri1007 ql f0 b fs36 fs100 fs36 NSRunLoop pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSObject fs20 fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSObject (NSObject) fs20 fs28 s7 f0 b fs24 Declared In:tab b0 fs28 f1 Foundation/NSRunLoop.h fs20 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 fs28 Class Description fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 The NSRunLoop class declares the programmatic interface to objects that manage input sources. An NSRunLoop object processes input for sources such as mouse and keyboard events from the window system, NSTimers, POSIX file descriptors, and NSConnections, based on a i modei0 argument. A given NSRunLoop object processes input for input sources associated with a particular mode. fs16 fs28 In general, your application won'27t need to either create or explicitly manage NSRunLoop objects. Each thread has an NSRunLoop object automatically created for it. The NSApplication object creates a default thread and therefore creates a default run loop. fs16 fs28 Applications wanting to perform their own explicit run loop management should send the b currentRunLoopb0 message to the NSRunLoop class object to obtain the NSRunLoop object for the current thread, then invoke one of the methods described below in 'aaRunning a Run Loop'ba to obtain input. fs16 fs28 Currently defined modes are: fs16 fs28 pard s18 li4509 fi-3655 ri1007 ql tx4509 tx10432 NSDefaultRunLoopModetab Use this mode to deal with input sources other than NSConnections. Defined in the b fs28 Foundation/NSRunLoop.hb0 fs28 header file. fs16 fs28 fi-3655 fi-3655 NSConnectionReplyModetab Use this mode to indicate NSConnections waiting for replies. Defined in the b fs28 Foundationfs28 /NSConnectionfs28 .hb0 fs28 header file. fs16 fs28 fi-3655 pard s16 li100 fi0 ri1007 ql f0 b fs24 fs28 Accessing the Current Run Loop fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 + (NSRunLoop *)b currentRunLoopb0 tab Returns the NSRunLoop for the current thread. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSString *)b currentModetab b0 Returns the current run loop mode. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSDate *)b limitDateForMode:b0 (NSString *)i modei0 tab Polls timers and platform-specific input managers for their limit date (if any). Timers will fire if appropriate. Returns b nilb0 if there are no input sources for this mode. fi-6552 fs16 fs28 fi-6552 fi-6552 fs16 fs28 fi-6552 pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Adding Timers fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b addTimer:b0 (NSTimer *)i aTimeri0 tab Registers the timer i aTimeri0 with input filter i modei0 . The run s9 li7030 fi-6553 fi-5796 b forMode:b0 (NSString *)i modei0 tab tab loop causes the timer to fire at its scheduled fire date. Note that timers are removed from modes if they supply b nilb0 as their fire date. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Running a Run Loop fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b acceptInputForMode:b0 (NSString *)i modei0 tab Runs the run loop, accepting input from the input sources s9 li7030 fi-6553 fi-5796 b beforeDate:b0 (NSDate *)i limitDatei0 tab tab for the mode specified by i modei0 until the time specified byi limitDatei0 . s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b runb0 tab Runs the run loop in the default mode until there is nothing to do. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b runMode:b0 (NSString *)i modei0 tab Runs the run loop, accepting input from filter i mode s9 li7030 fi-6553 fi-5796 i0 b beforeDate:b0 (NSDate *)i limitDatei0 tab tab until i limitDatei0 or until the earliest limit date for input sources in this mode. Returns NO without starting the run loop if there are no limit dates set for input sources (that is, there'27s nothing to do). s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b runUntilDate:b0 (NSDate *)i limitDatei0 tab Runs the run loopi i0 until i limitDatei0 or until there are no limit dates set fori i0 input sources (that is, there'27s nothing to do). }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.