HI all.
I am wanting to add an integer to an Item in a combobox as I add the item.
(I am using a pointer to a record here too, and the only item in the record is ID
:Integer)
Combo.Items.Add(rs.rdoColumns[1]);
New(pNewRec);
pNewRec^.ID:=rs.rdoColumns[0];
Combo.Items.AddObject('id',TObject(pNewRec));
this seems ok, BUT when I do the following
ll_Provider:=pRec(cmbReadonly.items.Objects[cmbReadonly.ItemIndex])^.ID;
if I do this, I get an Access violation.....can anyone see what I am doing worng....OR
suggest a better wat to do it ?
Cheers, Jeremy Coulter
Jeremy Coulter (Manager)
Visual Software Solutions
Christchurch, New Zealand
PH 03-3521595
FAX 03-3521596
MOBILE 021-2533214
www.vss.co.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"