Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Session.userManager.userCollection.source

Avatar

Level 3

when I call:


           _cSession.userManager.setUserDisplayName(_cSession.userManager.myUserID, sNewname);

than

          _cSession.userManager.userCollection.source;    

isn't updated emediately. Is that normal?

2 Replies

Avatar

Former Community Member

Yup, it's normal - your message must round-trip to the server and back

before any update occurs. Because this is a multi-user app, it's useful,

because the multi-user state doesn't change until it changes for everyone.

You can always bind the arraycollection to something or listen for events

that items have been changed if you need to take action.

nigel

Avatar

Level 3

after login I populate a user list, but they init with MY name.

I fixed it by by checking with myUserID :


                var dName:String;
                //Add users to the userArray data provider and tie the data provider to the list
                for (var i:int = 0; i < tmpArray.length; i++) {
                    if ( tmpArray[i].userID == _cSession.userManager.myUserID ) {
                        dName = sMyName;
                    } else {
                        dName = tmpArray[i].displayName;
                    }
                    userArray.addItem({label:dName, data:tmpArray[i]});
                }