Page 1 of 1

removeBuddy() question

Posted: 11 Jan 2010, 17:53
by blindgoatia
When calling removeBuddy(), the buddy Object is deleted but the buddyList Array.length is not updated.

buddyList.length = 4
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.


Posted: 12 Jan 2010, 15:15
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: