I've been pulling teeth on this issue. An error is thrown
whenever I try to perform a "_model.AddItem" call (or
SharedCollection.AddItem ) whenever the ConnectSessionContainer
fires the "synchronizationChange" event. The only time
"_model.AddItem" works is after the program loads, and then I use a
click event to then fire off "_model.AddItem" (code not shown).
I'm getting error: "*err.errorID:1009*err.Message:Error
#1009*err.name:TypeError*err.getStackTrace:null"
private function sendMessage(p_evt:SessionEvent):void
{
if (p_evt.type == SessionEvent.ERROR) {
notificationMessage.text = "Error: " + p_evt.error;
return;
}
if (p_evt.type == SessionEvent.SYNCHRONIZATION_CHANGE) {
if (cSession.isSynchronized) {
Alert.show("Connected");
try {
if (_model.connectSession.isSynchronized) {
_model.addItem({FirstName:"John12",LastName:"Austin12"}); }
else {
Alert.show("Model out of synch");
}
} catch (err:Error) {
Alert.show("*err.errorID:"+err.errorID+"*err.Message:"+err.message+"*err.name:"+err.name+"*err.getStackTrace:"+err.getStackTrace());
}
}
}
}
sendMessage is called via the below synchronizationChange
eventr:
<rtc:ConnectSessionContainer roomURL="myroomURL"
id="cSession" authenticator="{auth}" height="187"
width="628" y="106" x="7"
synchronizationChange="sendMessage(event)" > ...