The TList object is the `header` of the linked list, and it contains a pointer to the first link in the list. Each link is, if I remember right, a `TLink` object, containing a pointer to the previous TLink and a pointer to the next TLink and a pointer to the object that you stored in the link. So you need to work from the link, not the list itself. Get the link of the object that you are interested in, which returns a TLink object, and then go myTLink._succ to get the next link or myTLink._pred to get the previous link. Note that these are internal variables so BRL can potentially change them in future. All you're doing is directly accessing the previous or next link from within a given link, which is what you want. I thought there was a method that does this?
Here's what the TLink object looks like (from the linkedlist.mod module):
Type TLink
Field _value:Object
Field _succ:TLink,_pred:TLink
Rem
bbdoc: Returns the Object associated with this Link.
End Rem
Method Value:Object()
Return _value
End Method
Rem
bbdoc: Returns the next link in the List.
End Rem
Method NextLink:TLink()
If _succ._value<>_succ Return _succ
End Method
Rem
bbdoc: Returns the previous link in the List.
End Rem
Method PrevLink:TLink()
If _pred._value<>_pred Return _pred
End Method
Rem
bbdoc: Removes the link from the List.
End Rem
Method Remove()
_value=Null
_succ._pred=_pred
_pred._succ=_succ
End Method
End Type
So either you can find the link using myLink:TLink=myTList.FindLink(), and then do nextLink=myLink._succ (or myLink._pred for previous), or you can use the method myTLink.NextLink() and myTLink.PrevLink()
Also look at this code from the TList object: It get the _head field from the TList object, which is the pointer to the first TLink in the list, and then goes through all of them to find the link that you want.
Method FindLink:TLink( value:Object )
Local link:TLink=_head._succ
While link<>_head
If link._value.Compare( value )=0 Return link
link=link._succ
Wend
End Method
I prefer to either write my own more efficient linked list or at least look at _pred and _succ rather than go via a timewasting `get` method.