CreateObjcInformalDelegate | ||||||||||
Type | handler | |||||||||
Dictionary | LCB | |||||||||
Library | LiveCode Builder | |||||||||
Syntax |
| |||||||||
Associations | com.livecode.objc | |||||||||
Summary | Create an Objective-C object with LCB implementations of methods of an informal protocol. | |||||||||
Parameters |
| |||||||||
Example |
| |||||||||
Values |
| |||||||||
Related | Handler: CreateObjcDelegate, CreateObjcDelegateWithContext, CreateObjcInformalDelegateWithContext | |||||||||
Description | Use the CreateObjcInformalDelegate handler to create instances of Objective-C delegate classes with LCB implementations of protocol methods, when the Protocol object cannot be found at runtime. This occurs for example when all of the protocol methods are optional. Instead of a protocol name (as with CreateObjcDelegate), the pProtocol argument of CreateObjcInformalDelegate must be a proper list of foreign handlers for each of the methods of the protocol for which LCB callbacks are provided in the pHandlerMapping array. Once created an informal delegate can be set in the usual way on an
instance of the appropriate class (by binding to If any context is required to be passed as a parameter to the callback, use CreateObjcInformalDelegateWithContext. If the protocol can be resolved at runtime, it is generally easier to use the CreateObjcDelegate handler. |