TiProxy Class Reference
Inherits from | NSObject |
Conforms to | KrollTargetable |
Declared in | TiProxy.h |
Tasks
-
modelDelegate
Provides access to proxy delegate.
property -
– _hasListeners:
Whether or not the proxy has listeners for the specified event type.
-
– _fireEventToListener:withObject:listener:thisObject:
Tells the proxy to fire an event of the specified type to a listener.
-
– _configure
Called to perform the proxy initial configuration.
-
– destroyed
Whether or not the proxy was destroyed.
-
– setReproxying:
Tells the proxy that it is in reproxying stage.
-
– inReproxy
Whether or not the proxy is in reproxying stage.
-
– parentForBubbling
Returns proxy that should receive the event next in a case of bubbling. Return nil if the class does not bubble or there is no parent. Optionally return nil if bubbleParent is false — i.e., bubbleParent must be checked as well.
-
– keySequence
Returns an array of properties that must be set on the proxy object in a specific order, ordered from first to last. Any properties which are not in this list are set after the listed properties, and are set in undefined order.
-
bubbleParent
Indicates that this proxy should honor bubbling of user events, if the proxy is the type that has a parent to bubble to (This is primairly views, but may have some exceptions).
property -
– rememberProxy:
Tells the proxy to associate another proxy with it.
-
– forgetProxy:
Tells the proxy to disassociate another proxy from it.
-
– rememberSelf
Tells the proxy to retain associated JS object.
-
– forgetSelf
Tells the proxy to release associated JS object.
-
– allKeys
Returns an enumeration of keys of all properties set on the proxy object.
-
– allProperties
Returns a dictionary of all properties set on the proxy object.
-
– initializeProperty:defaultValue:
Initializes a new property on the proxy object.
-
– replaceValue:forKey:notification:
Sets or replaces the property on the proxy object.
-
– deleteKey:
Removes the property on the proxy object.
Properties
Instance Methods
_configure
Called to perform the proxy initial configuration.
- (void)_configure
Declared In
TiProxy.h
_fireEventToListener:withObject:listener:thisObject:
Tells the proxy to fire an event of the specified type to a listener.
- (void)_fireEventToListener:(NSString *)type withObject:(id)obj listener:(KrollCallback *)listener thisObject:(TiProxy *)thisObject
Parameters
- type
The event type.
- obj
The event properties.
- listener
The listener to fire event for.
- thisObject
The object representing ‘this’ in the context of the event handler.
Declared In
TiProxy.h
_hasListeners:
Whether or not the proxy has listeners for the specified event type.
- (BOOL)_hasListeners:(NSString *)type
Parameters
- type
The event type.
Return Value
YES if the proxy has any listeners for the specified event type, NO otherwise.
Declared In
TiProxy.h
allKeys
Returns an enumeration of keys of all properties set on the proxy object.
- (id<NSFastEnumeration>)allKeys
Return Value
The enumeration of property keys.
Declared In
TiProxy.h
allProperties
Returns a dictionary of all properties set on the proxy object.
- (NSDictionary *)allProperties
Return Value
The dictionary containing all properties.
Declared In
TiProxy.h
deleteKey:
Removes the property on the proxy object.
- (void)deleteKey:(NSString *)key
Parameters
- key
The property key.
Declared In
TiProxy.h
destroyed
Whether or not the proxy was destroyed.
- (BOOL)destroyed
Return Value
YES if destroyed, NO otherwise.
Declared In
TiProxy.h
forgetProxy:
Tells the proxy to disassociate another proxy from it.
- (void)forgetProxy:(TiProxy *)forgottenProxy
Parameters
- forgottenProxy
The proxy to forget.
Discussion
The deassociated proxy will be released. Note: rememberProxy/forgetProxy are not reference counted – multiple calls to rememberProxy: are all undone by a single call to <forgetProxy:>
See Also
Declared In
TiProxy.h
forgetSelf
Tells the proxy to release associated JS object.
- (void)forgetSelf
Declared In
TiProxy.h
inReproxy
Whether or not the proxy is in reproxying stage.
- (BOOL)inReproxy
Return Value
YES if the proxy is in reproxying stage, NO otherwise.
Declared In
TiProxy.h
initializeProperty:defaultValue:
Initializes a new property on the proxy object.
- (void)initializeProperty:(NSString *)name defaultValue:(id)value
Parameters
- name
The property name.
- value
The initial value to set on the property.
Declared In
TiProxy.h
keySequence
Returns an array of properties that must be set on the proxy object in a specific order, ordered from first to last. Any properties which are not in this list are set after the listed properties, and are set in undefined order.
- (NSArray *)keySequence
Return Value
The array of property keys.
Discussion
Override this method if the order in which properties are set is significant.
Declared In
TiProxy.h
parentForBubbling
Returns proxy that should receive the event next in a case of bubbling. Return nil if the class does not bubble or there is no parent. Optionally return nil if bubbleParent is false — i.e., bubbleParent must be checked as well.
- (TiProxy *)parentForBubbling
Discussion
Override this method for views that do not follow the standard children/parent model (e.g., table rows). Note that this is NOT for use by JS, because this is intentionally an iOS-only solution.
Declared In
TiProxy.h
rememberProxy:
Tells the proxy to associate another proxy with it.
- (void)rememberProxy:(TiProxy *)rememberedProxy
Parameters
- rememberedProxy
The proxy to remember.
Discussion
The associated proxy will be retained. Note: rememberProxy/forgetProxy are not reference counted – multiple calls to <rememberProxy:> are all undone by a single call to forgetProxy:
See Also
Declared In
TiProxy.h
rememberSelf
Tells the proxy to retain associated JS object.
- (void)rememberSelf
Declared In
TiProxy.h
replaceValue:forKey:notification:
Sets or replaces the property on the proxy object.
- (void)replaceValue:(id)value forKey:(NSString *)key notification:(BOOL)notify
Parameters
- value
The new value.
- key
The property key.
- notify
The flag to send value chnage notification to model delegate.
Declared In
TiProxy.h