Stark
2012-06-21 12:55:10 UTC
While scanning a dataset, I create an object (TBudget class) for each record
and I store this objects in a TList. I need access to each object in order
to assign a value to one of his fields. I don't know how to do it, since I
don't have a variable that references it.
while not MyTable.Eof do
begin
MyList.Add( TBudget.Create(...) );
// having created the object and having stored it in MyList, I need
to assign a value to the TBudget object.
// how do I make a reference to it ?
myObject.account:= MyTable.FieldByName('Acct').AsString; ?????
next;
end;
and I store this objects in a TList. I need access to each object in order
to assign a value to one of his fields. I don't know how to do it, since I
don't have a variable that references it.
while not MyTable.Eof do
begin
MyList.Add( TBudget.Create(...) );
// having created the object and having stored it in MyList, I need
to assign a value to the TBudget object.
// how do I make a reference to it ?
myObject.account:= MyTable.FieldByName('Acct').AsString; ?????
next;
end;