Room.rosterItems private?

Hi.

I am doing a MUC solution and I want to handle the room roster without using a list-enabled component.

To be able to do that, I added a get function for rosterItems and I update my roster wen the userJoin and userDeparture events are dispatched.

Do you know if there is a better way of doing this? Is there any reason for keeping the roomRoster private?

I just hacked into the List component therefore bypassing any unpleasantness with having to figure out the DataSelector Class.

Here’'s my “ListWatcher” class:

========

import mx.controls.List;

class ListWatcher extends List

{

var dataProvider;

function modelChanged(eventObj : Object)

{

var retArray:Array = new Array();

for(var i = 0; i < dataProvider.length; i++)

{

var obj = dataProvider.getItemAt(i);

retArray.push(obj);

}

_parent.setItemsList(retArray);

}

}

==============

Then just set the dataProvider on the “Listwatcher” like you would a normal component, and it will call setItemsList on its parent clip.