I have an array collection that I would like to limit to say 100 items. I tried setting up a filter function where the return was:
return (myAC.getItemIndex(item) > 100);
but the value was always -1. For whatever reason it couldn't find the item, even though the item is definitely there.
I'm able to do this with a while loop:
while(myAC.length > 100) myAC.removeItemAt(100);
Is there another way I can accomplish this? Thanks!