Hello,
Any code samples for waiting until two sharedproperties are synched? (one of them is a batonproperty as well)
I am aware I Can check if both of them are "issynchronized" and also can attach event listeners, but how do I make one wait for the other sync to finish?
Solved! Go to Solution.
Views
Replies
Total Likes
Just throwing out a suggestion, not sure if its a neat approach.
sharedProp_1.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, listener1)
batonProp_1.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, listener2)
protected function listener1(evt: CollectionNodeEvent) {
tempFunc();
}
protected function listener2(evt: CollectionNodeEvent) {
tempFunc();
}
protected function tempFunc() {
if (sharedProp_1.isSynchronized && batonProp_1.isSynchronized) {
//Do soemthing
}
}
Views
Replies
Total Likes
Just throwing out a suggestion, not sure if its a neat approach.
sharedProp_1.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, listener1)
batonProp_1.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, listener2)
protected function listener1(evt: CollectionNodeEvent) {
tempFunc();
}
protected function listener2(evt: CollectionNodeEvent) {
tempFunc();
}
protected function tempFunc() {
if (sharedProp_1.isSynchronized && batonProp_1.isSynchronized) {
//Do soemthing
}
}
Views
Replies
Total Likes
Appreciated aponnusa!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies