Subj : Directory Listing
To : Robert Wolfe
From : mark lewis
Date : Thu Nov 27 2014 06:52 pm
Following up a post on Thu, 27 Nov 2014, from mark lewis to Robert Wolfe:
ml> a little further and use a tstringlist instead... mainly because
ml> tstrings is designed to be inherited by other objects whch perform
ml> specialized tasks... tstringlist is one such object...
oh my... i can't believe i said that...
to clarify... the program i returned to you uses classes... above i used the
term "object" which is wrong in this case... i should have said "class"...
objects are something else but they may operate in similar fashions...
what's the difference between a class and an object? the main thing is that
objects live on the stack whereas classes live in the heap... there's a whole
lot more heap space than there is stack space... in a lot of today's world,
classes are preferred over objects... likely because of this particular
aspect...
aside from that, one can think of classes and objects in the same way... both
carry the code needed to access the data they contain...
finally, close inspection of the documentation will show that the TStringList
is derived from TStrings which is derived from TPersistent which is derived
from TObject ;)
PS: if you want the list of filenames sorted without case sensitivity, add
DirList.CaseSensitive := False;
after
DirList.Sorted := True;
;)
)\/(ark
If you think it's expensive to hire a professional to do the job, wait until
you hire an amateur.