PxPlus User Forum

Twitter Twitter Twitter

Author Topic: GET_FILE_BOX WindX vs local desktop  (Read 562 times)

Mike Hatfield

  • Gold Member
  • ****
  • Posts: 55
    • View Profile
GET_FILE_BOX WindX vs local desktop
« on: December 15, 2018, 12:49:03 AM »
Why does GET_FILE_BOX behave differently on a local Windows 10 Pro desktop vs WindX on the same desktop to Server 2016 NTHOST
Server and desktop are running V1410-001

IE on WindX GET_FILE_BOX displays a nomads list box and on the local desktop it displays File Explorer

This program code:
%SCANDATA$="\HIT\SCANDATA"

0010 BEGIN
0020 PRINT 'CS',
0100 LET PDIR$=%SCANDATA$; LET PROOT$=%SCANDATA$
0200 GET_FILE_BOX PDIR$,PROOT$,"Choose Order File","Text Files|order*.TXT,"

On WindX displays a list box in the folder \hit\scandata with only the order*.TXT files
Which is what I want.

On local desktop line 200 drops straight through to next line. Weird!!
If I set PDIR$="" then on local desktop it displays File Explorer in the folder \HIT with ALL files.

What is going on?


Mike H

Mike Hatfield

  • Gold Member
  • ****
  • Posts: 55
    • View Profile
Re: GET_FILE_BOX WindX vs local desktop
« Reply #1 on: December 15, 2018, 01:16:15 AM »
In previous post I made a mistake the %SCANDATA$ should read "/HIT/SCANDATA/" with the trailing "/"
What I have discovered is that on my local windows desktop I must use backslashes.
I thought PxPlus could interchange  / and \
 
On my local desktop it is working but still displays File Explorer.
I presume this is intended behaviour.
Why is WindX a LIST BOX and local is File Explorer?
Mike H

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3368
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: GET_FILE_BOX WindX vs local desktop
« Reply #2 on: December 17, 2018, 10:31:09 AM »
Mike,

Regarding your First post:

The pathname passed as the first parameter to the GET_FILE_BOX command should be the default file name, and the second should be the starting directory.  Our File selector is a bit more forgiving and allowed you to pass a directory.

Regarding your second post and the difference between running locally and thru WindX:

When running locally we use the windows built-in File explorer.  Only when running on WindX do we use our own file section display and only there can we restrict the user.  Basically there is little advantage using the restricted file selector when running locally since the user can simply open the Windows File Explorer directly from the Start button or task bar and access any file on the system exclusive of Windows own security.

Now if you want to use the restricted file selection utility you can directly issue a CALL "[lcl]*plus/winutl/get_file_box" passing it the same arguments, but as I said above there is little to be gained if the purpose is to restrict access.

As for the type of slash, when opening files we generally will allow either forward or back slashes on Windows, the OS calls do require you to pass the correct delimiter.