Try this as well:
' ----------------------------------------------------------------------------- ' ccListIndex ' ----------------------------------------------------------------------------- Function ccListIndex%(list:TList, value:Object Var) 'Loop through a list and return the index of the matching object. Local index = 0 For Local o:Object = EachIn list If o = value Then Return index index:+1 Next 'No match Return -1 End Function