Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sys(2019) returns Empty String if config.fpw is in proje
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00751778
Message ID:
00751918
Vues:
29
Jim,

If it returned the name of the exe file itself, you'd have an appropriate, unambiguous way to cover all cases.

Mike

>I think I know why this has changed.
>
>In VFP8, we allow an external config file to be read even if there is an internal config file built into your exe. The external config file is only searched for (and loaded if found) if the internal file contains the following line:
>
>
>ALLOWEXTERNAL = ON
>
>
>Items in the external file take precedence if there are any duplicate entries.
>
>See the "Special Terms for Configuration Files" help topic for more info on ALLOWEXTERNAL.
>
>So for VFP8, it looks like SYS(2019) returns "" if there is no external config file, regardless of if there is an internal file.
>
>How do you think it should behave?
>
>Perhaps it should return the internal file if there is no ALLOWEXTERNAL = ON in the internal file, as there would be no possiblity of reading an external file.
>
>I am not sure this is a bug, but I'll pass it up the line for a look.
>
>Thanks!
>
>>Not sure if this is a fix in VFP8 or not, but this behavior has changed and it took me a little while to figure it out, so I'll share it... In VFP7 if you include your config.fpw in the project, which ends up being embedded in the .exe, the sys(2019) would return the name of the config file used. Now in VFP8 it returns an Empty string, eventhough it "is" using the config.fpw embedded in the .exe. So now if you want to test if a config.fpw file was used and you included it in your project, you have to do something else, like maybe set something in the config.fpw and test for that instead of using sys(2019).
>>
>>Mark
Montage

"Free at last..."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform