Inherits from NSObject
Conforms to KrollTargetable
Declared in TiProxy.h

Overview

The base class for Titanium proxies.

Tasks

Properties

modelDelegate

Provides access to proxy delegate.

@property (nonatomic, retain, readwrite) id<> modelDelegate

Declared In

TiProxy.h

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:>

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

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

setReproxying:

Tells the proxy that it is in reproxying stage.

- (void)setReproxying:(BOOL)yn

Parameters

yn

YES if the proxy is in reproxying stage, NO otherwise.

Declared In

TiProxy.h