Class

NSScriptCoercionHandler

A mechanism for converting one kind of scripting data to another.

Declaration

@interface NSScriptCoercionHandler : NSObject

Overview

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.

Topics

Accessing the application’s handler

+ sharedCoercionHandler

Returns the shared NSScriptCoercionHandler for the application.

Working with handlers

- coerceValue:toClass:

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

- registerCoercer:selector:toConvertFromClass:toClass:

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

Relationships

Inherits From

See Also

NSObject Script Support

NSComparisonMethods

A collection of default comparison methods useful for performing specifier tests.

NSScriptingComparisonMethods

A collection of methods useful for comparing script objects.

NSScriptKeyValueCoding

A collection of methods that provide additional capabilities for working with key-value coding.

NSScriptObjectSpecifiers

A collection of methods providing additional object specifier functionality.

NSScriptExecutionContext

The context in which the current script command is executed.