I am having some problems removing objects from the linked lists, and after a number of attempts I am going to get your help on this.
In the above code, how would you remove, lets say, object z3 ?
Also, should I be creating the objects differently?
Global zObjectList:TList = CreateList() Type zObject Field x Field y Method New() zObjectList.AddLast(Self) End Method Function create:zObject( x, y ) Local obj:zObject = New zObject obj.x = x obj.y = y Return obj End Function End Type z1:zObject = zObject.create( 10, 10 ) z2:zObject = zObject.create( 20, 20 ) z3:zObject = zObject.create( 30, 30 ) z4:zObject = zObject.create( 40, 40 ) z5:zObject = zObject.create( 50, 50 ) Print z1.x + ","+z1.y Print z2.x + ","+z2.y Print z3.x + ","+z3.y Print z4.x + ","+z4.y Print z5.x + ","+z5.y WaitKey
In the above code, how would you remove, lets say, object z3 ?
Also, should I be creating the objects differently?