Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Missing Extension
Message
From
27/05/2005 14:37:12
 
 
To
27/05/2005 10:56:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01018081
Message ID:
01018234
Views:
9
>>>>In a runtime VFP Command Window, I use the MODIFY COMMAND,
>>>>>open a PRG and change the PRG.
>>>>>When I click on File / Save As, sometimes the PRG name is
>>>>>in the Save As dialog box but it has no ".PRG" extension.
>>>>>If I go ahead and hit SAVE, sometimes the file is saved
>>>>>without an extension.
>>>>>How can I improve this?
>>>>>
>>>>>Thanks,
>>>>>TWH :)
>>>>
>>>>What version of VFP? I can't reproduce it in VFP8 and VFP9 here.
>>>
>>>Hi Alex,
>>>I am using VFP 8 runtime and I am using Randy Pearson's CodeBlck.PRG
>>>to get the runtime VFP Command Window. This problem is intermittent.
>>>Sometime it has the .PRG extension and sometimes not.

>>
>>That's strange. MODI COMM by default uses PRG. You are opening a prg so it hould know that. I have not seen this behavior. Being intermittent and hard to reproduce makes it tougher.
>
>Alex, Sergey, and All,
> I wonder if this problem could be solved using PUTFILE() to force
>the proper extension.
>
>
save_as_name = PUTFILE("Save this file as:", FORCEEXT(myfile, "PRG"), "PRG")
>
>However, I am not sure how to set up the code to actually do the save
>after the PUTFILE() have gotten a file name with extension.
>I have the same intermittent problem when I use MODIFY REPORT.
>Thanks,
>TWH :)

To All,
I seem to have found a solution to this problem. First, it
only seems to occur when I a using a compiled app (.EXE)
(under VFP 5 or VFP 8) and I am using Randy Pearson's CodeBlck.PRG.
Also, the Windows Explorer "View" must have "Hide extensions for
known file types" checked.
The solution that I found looks for the presence of ".PRG"
or ".FRX" in the picked file name and adds that extension on to
the file name if it is missing.
Thanks for your input,
Terry Harris :)
Previous
Reply
Map
View

Click here to load this message in the networking platform