File tstringlist
Share this post Link to post. Stefan Glienke Posted September 9, Remy Lebeau Posted September 10, FPiette Rollo62 Posted September 10, edited. I like useful enhancements to such basic classes very much. What is your opinion, about when to use interposer classes, and when better avoid it?
Edited September 10, by Rollo Stefan Glienke Dany Marmur Thanks for your considerations. I use interposer heavily on components, to fix and enhance their behaviour. Sometimes I think even thats too much, but everytime it turns out that they behave so well. From that fact comes my dark consideration to use them elsewhere too, from time to time.
My thoughts were about enhancing existing units and frameworks, by simply dropping an uses entry, which "auto-magically" can enhance the units functionality, without too much or any reworking of the whole unit. You're arguments are right, so I won't touch them, and stay on the safe side. Posted September 11, edited.
Brutal said:. Lars Fosdal Posted September 11, Splitted off the Interposer discussion. Brutal Yes, sorry for that. At least we all agree that this is the right way to go for this, as a new, derived class. Uwe Raabe Edited September 11, by Rollo Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. Note that the Strings property is the default property.
This string will have each string terminated with a carriage return and line feed combination CRLF. Useful for loading from a visual object that can hold multiple lines of text. CommaText property Get or set the list via a big string. This string will have the list strings separated by commas. This is useful for loading from a text spreadsheet export. When getting, if a string contains embedded spaces, it will be enclosed in double quote marks.
DelimitedText property Get or set the list via a big string. This string will have the list strings separated by the Delimiter value default is a comma. Strings containing embedded blanks must be enclosed in the QuoteChar default is ". QuoteChar property Used to enclose strings that have embedded blanks when using DelimitedText.
Delimiter property Used to separate strings when using DelimitedText. A typical example would be: , The first figure is the unique identifier, the rest are just data for that analysis. If the file was as above, and the user analysed picture again, when writing to output to the file at the end, I would want it to recognise as a duplicate, and ask the user whether to carry on and have 2 entries, overwrite the previous entry or cancel.
I therefore need to be able to search, as well as accurately overwrite if needed. The number of data entries for each analysis is the same. Any help much appreciated! Here is one way. Note that if there are more than two lines with the same number, the request is ambiguous. What this routine does is show only the first match, whether or not you keep the entry. When the second one is reached it is matched with the third and so on.
If you want to display ALL matches before continuing, then a different approach will be needed. Free; end; ShowMessage 'Check complete. Was expecting a few pointers not the complete solution. Very generous of you Zathras. Will implement and check, but after a quick read through it looks spot on!
Thanks again, JDN. Create; MyStringList. Free; end;. What version of Delphi? I don't have. Delimiter or. DelimitedText in D5.
0コメント