我一直在利用习俗活动处理与 t器具有约束力的数据,利用一个名为“RefreshComp”的活动(所有物体的特性)处理特定物品,并赋予新价值。 这种新价值可能来自一项推介通知,一种在电话中经过编辑的标语,即你想要向所有人传播......
Titanium.App.fireEvent(RefreshComp, {
refreshid : objectId + - + attribute,
value : newvalue
});
以及
function registerEvent(objectId,attribute,eventHandler){
Titanium.App.addEventListener(RefreshComp, function(e) {
if((e.refreshid === (objectId + - + attribute))) {
eventHandler(comp, e.value);
}
});
}
以及then your eventHandler function could be as simple as
function eventHandler(comp,newvalue){
comp.value = newvalue;
}
或更复杂(如不断变化的背景......)
我的意思是,这造成参与者受全球环境的约束,从而不会释放目标。 我试图将习俗活动附在构成部分本身,但并不奏效。 因此,我正在收到正在坠毁的申请。
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x242424cf
because the binding refer to a component still in memory on the IOS side but then when TiViewProxy.m calls for the parent function in _hasListeners , it is not able to find the parent in memory that does not have any associated object 以及the parent has been removed form the memory
I have googled 以及look at the git rep of appcelerator but there are no example of this.