AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

TComboBox and string object

Ein Thema von WojTec · begonnen am 14. Feb 2012 · letzter Beitrag vom 15. Feb 2012
 
Medium

Registriert seit: 23. Jan 2008
3.688 Beiträge
 
Delphi 2007 Enterprise
 
#2

AW: TComboBox and string object

  Alt 14. Feb 2012, 14:14
The most direct way: Use a global variable for your string. But that can still end up in all sorts of messes because of the compiler magic strings come with. Especially fun stuff like copy-on-write related things.
(Edit, to be clear: Do NOT do this! It may work in some special and simple cases, but is dirty like whatnot.)

A more sensible way: Define a TStringList in a suitable scope, and put the index of your desired string from that list into your Object-Property. To read it, just use that index on your StringList. You'll save yourself a lot of potential trouble that way
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)

Geändert von Medium (14. Feb 2012 um 14:16 Uhr)
  Mit Zitat antworten Zitat
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:49 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz