1. Home
  2. Computing & Technology
  3. Delphi Programming
Zarko Gajic
Zarko's Delphi Programming Blog

By Zarko Gajic, About.com Guide to Delphi Programming

Class Helper for Delphi's TStrings: Implemented Add(Variant)

Monday November 3, 2008
in Delphi TIPS :: In Delphi, the TStrings is the base class for objects that represent a list of strings. Examples include Lines property of a TMemo, Items property of a TListBox or TComboBox, etc.
When you need to add integer values, boolean values or any other non-string values to the list you need to use some of the RTL's conversion routines (from int to string for example).

Wouldn't it be better if you can simply say "Add(2008)" or "Add(True)"?

Read the full article to learn how to Implement a Class Helper for Delphi's TStrings: Add(Variant)

Related:

Comments

November 3, 2008 at 6:23 am
(1) Fred says:

Hi, the link for this article seems to have a problem !

November 3, 2008 at 6:34 am
(2) Zarko Gajic says:

Fred,

Thanks, fixed.

p.s.
Note that the title is also the link to that article.

November 4, 2008 at 7:38 pm
(3) surfbored says:

Is it possible to use this same approach with Ordinals (like color lists and such)?

If so, how would this look?

November 6, 2008 at 3:59 am
(4) Jens Borrisholt says:

surfbored>>I’m not quite sure exactly what you wand .. Perhaps you could be al ilttle more specific …

You can contact me at : jens@borrisholt.com

Jens Borrsiholt

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore Delphi Programming
About.com Special Features

Reader's Choice Award Winners

What are the best instant messengers, apps, editors and more? You told us, for our 2010 technology awards program. More >

iPad Central

Is Apple's new tablet computer impractical, a must-have -- or both? We'll help you figure it out. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2010 About.com, a part of The New York Times Company.

All rights reserved.