I have a TObjectList with OwnsObjects = true. It contains quite a few objects. Now I want to remove the object at index Idx from that list, without freeing it.
Is the Extract method the only option?
ExtractedObject := TheList.Extract(TheList[Idx]);
All other methods seem to free the object. I am looking for something a little bit more...
I've created a class like
TMyClass = class(TObject)
private
FList1: TObjectList<List1>;
FList2: TObjectList<List2>;
public
end;
Now, I want a method FillArray(Content);, which preferably should be implemented once, i.e. no overload. I believe this is possible using generics, but I'm too inexperienced with these beasts to actually ...
I need to understand how to use the generic Delphi 2009 TObjectList. My non-TObjectList attempt looked like
TSomeClass = class(TObject)
private
FList1: Array of TList1;
FList2: Array of TList2;
public
procedure FillArray(var List: Array of TList1; Source: TSource); Overload;
procedure FillArray(var List: Array of TList2; Source:...
I think i need a nudge in the right direction:
I have two Tobjectlists of the same datatype, and i want to concatenate these into a new list into which list1 shall be copied used unmodified followed by list2 reversed)
type
TMyListType = TobjectList<MyClass>
var
list1, list2, resList : TMyListtype
begin
FillListWithObjects(list1...