TList Question
BlitzMax Forums/BlitzMax Beginners Area/TList Question| 
 | ||
| Opinions on whether this is possible?  Can't test atm. 
Type TBlah
     Field BlahList:TList
     Method Something()
          BlahList.SomethingElse()
     End Method
     Method SomethingElse()
          'do stuff to the BlahList
     End Method
End Type
 | 
| 
 | ||
| Hmm...actually...woundn't this cycle through every TYang in the YangList through the .Render() without having to do a For/Next loop?  Again, not at home so I can't test it. 
Type TYin
   Field YangList:TList = New TList
   Method Render()
      TYang(YangList).Render()
   End Method
End Type
Type TYang
   Field image:TImage
   Field x#, y#
   Method Render()
      DrawImage image, x, y
   End Method
End Type
 | 
| 
 | ||
| ... | 
| 
 | ||
| nope. You're trying to cast a TList to a TYang, which if it worked would just give you one object, not perform the operation on every object in the list. It doesn't work anyway, because TList doesn't extend TYang. | 
| 
 | ||
| Yeah I tried it when I went home for lunch.  Thanks for the explanation. |