community.borland.com

Article #15396: Patch for the STDDLG Unit

 Technical Information Database

TI396D.txt   Patch for the STDDLG Unit
Category   :TVISION
Platform    :All
Product    :Pascal  All

Description:


When using the TFileDialog object with Borland Pascal 7.0, users
may find that errors occur when navigating through subdirectories
using the "..\" symbol in the files listbox.

The problem lies in the STDDLG.PAS file which normally resides in
the \BP\RTL\TV subdirectory. After opening the file, search on
the word RelativePath to find the following code:

function RelativePath(var S: PathStr): Boolean;
begin
  S := LTrim(RTrim(S));
  RelativePath := not (S <> '') and ((S[1] = '\') or (S[2] =
    ':'));
end;

To resolve the problem, change the fourth line so that it
looks like this:

  RelativePath := not ((S <> '') and ((S[1] = '\') or (S[2] =
    ':')));

When you are done, you can copy your new TPU or TPP file into the
\BP\UNITS subdirectory.

This problem only appears in Borland Pascal 7.0.  STDDLGS
shipping with Turbo Pascal 7.0 is correct.


Reference:


7/16/98 4:33:43 PM
 

Last Modified: 01-SEP-99