Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

NSOperationMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa Threading MBS MacFrameworks Plugin 8.0 Yes No No Yes, macOS only No
Function: The class to do operations in Cocoa.
Requires Mac OS X 10.5.

The NSOperation class manages the execution of a single encapsulated task. Operations are typically scheduled by adding them to an operation queue object (an instance of the NSOperationQueue class), although you can also execute them directly by explicitly invoking their start method.

Operation objects are single-shot objects, that is, they perform their task once. You cannot reuse the same NSOperation object to perform a task (or a slight variant of the task) multiple times in succession. Attempting to execute an operation that has already finished results in an exception.

When manually executing operations, you are responsible for making sure the object is ready to execute. Starting an operation that is not in the ready state generally results in an exception being thrown. If you use an operation queue to manage the execution, the NSOperationQueue object ensures that the operation is executed only when it is ready.

Feedback, Comments & Corrections

This class has no sub classes.

Some methods using this class:

Some examples which use this class:

The items on this page are in the following plugins: MBS MacFrameworks Plugin.

NSOpenPanelMBS   -   NSOperationQueueMBS

MBS Xojo Plugins