Jump to content

Search the Community

Showing results for tags 'tstringlist'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 2 results

  1. I've been wondering about this for some time and now I need to iterate over the strings to view them but I can't when using TStrings. And the only way to do it is to create a temporary TStringList var and assign the TStrings over to it. Then, I can step through the list to observe what is going on during debug. It seems like extra work to me. Anyway. See below for ex of how I have to create the extra work. It is not the actual code but just an example of some of it. function inlist(myts: tstrings): tstringlist; var tsL: tstringlist; begin myts := tstrings.create(self) tsL := tstringlist.create; tsL.assign(myts); . . s:=s; // <-- debug breat point result.assign(tsL); tsL.free; end; procedure TForm1.btn3Click(Sender: TObject); var ts: tstrings; begin ts := tstringlist.create; ts := inlist(memo1.lines) . . ts.free; end; In tstringlist, there is a FList that holds the strings. I searched in tstrings but there is none. Surely, tstrings is storing the strings somewhere. I just need to know where so I can view them during debugging. Does anyone know where tstrings stores the strings?
  2. Actually I guess is the other way around! The more expert I get the more refactoring I do! As @Lars Fosdal said, cryptic code, WTF was I thinking code, Code that could benefit from modern RTL code if there's no performance penalty. For example: For lPair in SomeObjectList is slower than for i:= 0 to SomeobjectList.count-1. So I won't refactor it. Depending where the code is placed, I will use one form or the other. Replacing TStringList (used as dictionary) with a TDictionary/TDictionaryObject makes a huge diference!
×