MonobjcMonobjc Documented Class Library
RegisterCoercerSelectorToConvertFromClassToClass Method (coercer, selector, fromClass, toClass)
NamespacesMonobjc.FoundationNSScriptCoercionHandlerRegisterCoercerSelectorToConvertFromClassToClass(Id, IntPtr, Class, Class)

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

Original signature is '- (void)registerCoercer:(id)coercer selector:(SEL)selector toConvertFromClass:(Class)fromClass toClass:(Class)toClass'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual void RegisterCoercerSelectorToConvertFromClassToClass(
	Id coercer,
	IntPtr selector,
	Class fromClass,
	Class toClass
)
Public Overridable Sub RegisterCoercerSelectorToConvertFromClassToClass ( _
	coercer As Id, _
	selector As IntPtr, _
	fromClass As Class, _
	toClass As Class _
)
public:
virtual void RegisterCoercerSelectorToConvertFromClassToClass(
	Id^ coercer, 
	IntPtr selector, 
	Class^ fromClass, 
	Class^ toClass
)
Parameters
coercer (Id)
The object that performs the coercion. coercer should typically be a class object.
selector (IntPtr)
A selector that specifies the method to perform the coercion. selector should typically be a factory method, and must take two arguments. The first is the value to be converted. The second is the class to convert it to.
fromClass (Class)
The class for which instances are coerced.
toClass (Class)
The class to which instances of fromClass are coerced.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)