Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TOpenDialog file woes.....

Posted on 1998-04-08
7
Medium Priority
?
302 Views
Last Modified: 2010-05-18
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
Comment
Question by:RogerMadore
  • 4
  • 3
7 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1361338
Can you show some code?
0
 

Author Comment

by:RogerMadore
ID: 1361339
  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
 
LVL 5

Accepted Solution

by:
ronit051397 earned 200 total points
ID: 1361340
if OpenDialog1.Execute then
  Memo1.Lines.Assign(OpenDialog1.Files);
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:RogerMadore
ID: 1361341
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
 
LVL 5

Expert Comment

by:ronit051397
ID: 1361342
I have 36 selected 36 files and it worked fine. What version of Delphi do you have?
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1361343
I am going to rest in the carribeans, so you better reject my answer and let others to answer.

Bye
Ronit
0
 

Author Comment

by:RogerMadore
ID: 1361344
I have Delphi 3 Client/Server (Build 5.53)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question