Contents

run(withInput:)

Requests the action to perform its task using the specified input.

Declaration

func run(withInput input: Any?) throws -> Any

Parameters

  • input:

    The input for the receiving action. Should contain one or more objects compatible with one of the types specified in the action’s Selectedinputtype property.

Return Value

An NSArray object that contains one or more objects of a data type compatible with a type specified in the receiving action’s AMProvides property. If the action doesn’t modify the data passed in input, it should return it unchanged. If the action doesn’t have any data to provide, it should return an empty NSArray object.

Discussion

This method is intended to be overridden.

The input and output objects for actions are usually instances of NSArray. If the action encounters problems, it should return by indirection an NSError object that describes the error.

See Also

Controlling the Action