Provides a mechanism for converting one kind of scripting data to another. A shared instance of this class coerces (converts) object values to objects of another class, using information supplied by classes that register with it. Coercions frequently are required during key-value coding.


Accessing the application’s handler

class func shared()

Returns the shared NSScriptCoercionHandler for the application.

Working with handlers

func coerceValue(Any, to: AnyClass)

Returns an object of a given class representing a given value.

func registerCoercer(Any, selector: Selector, toConvertFrom: AnyClass, to: AnyClass)

Registers a given object (typically a class) to handle coercions (conversions) from one given class to another.


Inherits From

Conforms To