removeBuddy() question

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
blindgoatia
Posts: 8
Joined: 02 Jul 2009, 18:29

removeBuddy() question

Post by blindgoatia »

When calling removeBuddy(), the buddy Object is deleted but the buddyList Array.length is not updated.

Ex)
buddyList.length = 4
removeBudy("fred");
buddyList.length = 4 but there are only 3 objects in the buddyList Array

Is this meant to be this way? If so, what is the best way to get the number of buddies in your buddyList? It seems rather silly to "for each" them and count them when it's already an array that we could just use the .length property if it was updated on the Object deletion.

Thanks,
blindgoat
-- blindgoat
blindgoatia
Posts: 8
Joined: 02 Jul 2009, 18:29

Post by blindgoatia »

I had searched the forums prior to posting, but I didn't see an answer until today.

This answers my question, for anyone interested: http://forums.smartfoxserver.com/viewto ... sc&start=0
-- blindgoat
Post Reply