Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automatic SET PROCEDURE after recompiling???
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01212371
Message ID:
01212461
Views:
18
You could use that approach if you could tie the snippet to a hotkey _and_ if there there were a way to fetch the equivalent of _screen.ActiveSourceFile. You also would need a way to know if the compile was error-free.

I am wondering if there is a way to simply use the Compile selection on the Program menu pad and have VFP itself be smart enough to follow this simple logic: If the PRG compiles without errors and if a compiled file of the same name has been force-released from memory by VFP during the VFP session, then (at the very least) provide a quick Y/N popup option regarding reinstating the FXP as a loaded procedure file.

>would something like this work?
>
>
>Compyle.prg
>LPARAMETERS tcPrg
>IF FILE( FORCEEXT(tcPrg,'prg'))
>	RELEASE PROCEDURE (tcprg)
>	COMPILE (tcPrg)
>	SET PROCEDURE TO (tcPrg) additive
>ENDIF
>
>
>Glenn
>
>
>>I am constantly running into this annoyance in the VFP IDE setting: I have a procedure file that has been made "visible" by a "Set Procedure To" command. Every time I edit/recompile the PRG, the FXP file is removed from memory, and I have to remember to go back to the Command Window and again issue a "Set Procedure To ... Additive" command. Otherwise, as many of you have experienced, the routines in the procedure file cannot be found.
>>
>>Is there not a way to tell VFP to automatically do a "Set Procedure To ... Additive" whenever you recompile a PRG? VFP _knows_ it has removed the corresponding FXP from memory (because you edited it) during the same VFP session... so it seems there should be a way.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform