Add String in AddObject method and retrieving its value

Eduardo Duran Cardenas <[email protected]>
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <51B9D9ACEE68B840A27F7C86903C9D15012A6F38@TFM_MTY_DOM05>
I though something like this but must have something wrong.. 
hope someone can help
 
list : Tstrings
q :query
 
I've tried some ways... but doesn´t work.
 
while not q.eof do begin
 List.addObject(q.fieldbyname('FullName').asstring, 
                      TObject(q.fieldbyname('ShortName').asstring))   //
also put the string word after TObject and looks like
TObject(String(q.Fieldby....
 q.next;
end;
 
ComboBoxOnChange(Sender:Tobject);
begin
  with TComboBox(Sender) do
  Showmessage(string(items.object[itemindex]))
end;
 
 
 
Eduardo Duran C.
TFM, Departamento TI
83057900 ext 7508

 

 


[Non-text portions of this message have been removed]


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Coral Calcium for Greater Health - $23.95
http://www.challengerone.com/t/l.asp?cid=2805&lp=calcium2.asp
http://us.click.yahoo.com/MmkSQC/NTVGAA/ySSFAA/i7folB/TM
---------------------------------------------------------------------~->

Delphi Tips & Tutorials...
http://www.delphicollection.com
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
--------------------------------------------------------------- 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.