RE: Add String in AddObject method and retrieving its value
GALLAGHER Kevin S <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <[email protected]> |
I took at quick look, are you getting errors on the ShowMessage line? Beings that you have "items.object" rather then "items.objects" -----Original Message----- From: Eduardo Duran Cardenas [mailto:[email protected]] Sent: Wednesday, July 09, 2003 7:32 AM To: [email protected] Subject: [Delphi] Add String in AddObject method and retrieving its value 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 ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/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/