• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

TOpenDialog file woes.....

I've been using TOpenDialog for selecting multiple files. Although the selected files are stored in the TString property "Files", I can't seem to access all the lines of this object. It will contain the first 17 files and a truncated copy of the 18th line. Is this a known bug? Is there are patch or a workaround?
0
RogerMadore
Asked:
RogerMadore
  • 4
  • 3
1 Solution
 
ronit051397Commented:
Can you show some code?
0
 
RogerMadoreAuthor Commented:
  If OpenDialog.Files.Count>0 Then
      Begin
      For X := 0 To OpenDialog.Files.Count-1 Do
         Begin
         If FileExists(OpenDialog.Files[X]) Then
            Begin
            mtrLoadFiles(OpenDialog.Files[X]);
            Memo.Lines.Add(OpenDialog.Files[X]+' added.');
            End;
         End;

0
 
ronit051397Commented:
if OpenDialog1.Execute then
  Memo1.Lines.Assign(OpenDialog1.Files);
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
RogerMadoreAuthor Commented:
Thanks for the answer, but unfortunately it doesn't work. If you look at the source of Dialog.Pas, you'll see a buffer being used. I tried changing this buffer size and creating my own component, but it still didn't work.... perhaps I overlooked something. Thanks for any other input.
function TOpenDialog.DoExecute(Func: Pointer): Bool;
const
  MultiSelectBufferSize = 8192;
  ...
begin
   ...
    if ofAllowMultiSelect in FOptions then
      nMaxFile := MultiSelectBufferSize else
      nMaxFile := MAX_PATH;
   ...
0
 
ronit051397Commented:
I have 36 selected 36 files and it worked fine. What version of Delphi do you have?
0
 
ronit051397Commented:
I am going to rest in the carribeans, so you better reject my answer and let others to answer.

Bye
Ronit
0
 
RogerMadoreAuthor Commented:
I have Delphi 3 Client/Server (Build 5.53)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now