|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Cocoa||MBS MacCocoa Plugin||13.5||Yes||No||No||Yes, macOS only||No|
An NSRunLoop object processes input for sources such as mouse and keyboard events from the window system, NSPort objects, and NSConnection objects. An NSRunLoop object also processes NSTimer events.
Your application cannot either create or explicitly manage NSRunLoop objects. Each NSThread object, including the application's main thread, has an NSRunLoop object automatically created for it as needed. If you need to access the current thread's run loop, you do so with the class method currentRunLoop.
Note that from the perspective of NSRunloop, NSTimer objects are not "input"—they are a special type, and one of the things that means is that they do not cause the run loop to return when they fire.
The NSRunLoop class is generally not considered to be thread-safe and its methods should only be called within the context of the current thread. You should never try to call the methods of an NSRunLoop object running in a different thread, as doing so might cause unexpected results.
- 2 properties
- 8 methods
- 4 shared methods
This class has no sub classes.
Some methods using this class:
- NSTimerMBS.Constructor(fireDate as date, timeInterval as Double, repeats as boolean, runloop as NSRunLoopMBS, runloopMode as string)
Some examples which use this class:
The items on this page are in the following plugins: MBS MacCocoa Plugin.
MBS Xojo PDF Plugins