What does it actually mean when CollectionNode.isSynchronized is true?
========================================================
var auth : AdobeHSAuthenticator = new AdobeHSAuthenticator();
auth.userName = 'someaccount'; //change this accordingly
auth.password = 'somepassword'; //change this accordingly
session = new ConnectSession();
session.roomURL = 'someroomurl'; //change this accordingly
session.authenticator = auth;
// session.login(); //intentionally not logging in
rootCollectionNode = new RootCollectionNode();
rootCollectionNode.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSyncChange);
rootCollectionNode.connectSession = session;
rootCollectionNode.subscribe();
}
private function onSyncChange(event : CollectionNodeEvent) : void {
trace("isRootCollectionNode SYNC? " , rootCollectionNode.isSynchronized)
}
========================================================
Views
Replies
Total Likes
It means we have a bug! FWIW, CollectionNode is fine, but RootCollectionNode doesn't behave exactly like a CollectionNode (you can't pub/sub, for example - it's really only used for determining the set of CollectionNodes in the room). In this case, it's pretty obvious that we've never used RootCollectionNode.isSynchronized (it actually will fire the event again, after you really login).
We'll fix the bug for the next drop, but out of curiosity, what were you using this for? ConnectSession.SYNCHRONIZATION_CHANGE will work as a workaround.
thanks for the feedback!
nigel
Hey Nigel,
Thanks for the quick clarification. I thought I was going crazy.
Basically trying out the RootCollectionNode class to do remove collectionNodes when the session needs to restart or be 'cleaned'.
Since I am not using the Flex API, the RoomCleaner is not available.
Views
Replies
Total Likes
Ooh, useful point - we should allow for roomCleaner to work in the Flash API too. Added to the list.
nigel
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies