Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turn off auto-compilation in screen, class designers 1

Status
Not open for further replies.

awaresoft

Programmer
Feb 16, 2002
373
DE
Anyone know if its possible to turn off the auto-compilation that occurs when one is working in the screen and class designer editor windows.

By default, VFP automatically compiles snippet source when you exit a specific method.

I would like to disable this behavior so I can pre-process the snippet source myself before VFP compiles it.

Is this possible?

Thanks,
Malcolm
 

Tools->Options->IDE->Compile before saving. Unselect it.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,

> Tools->Options->IDE->Compile before saving

That setting only works for PRG program files. Clear this setting and add/edit a form or class method. When you save your method or navigate to a new method, VFP will automatically attempt to compile your code anyway.

Do you see something different? I'm running VFP 9.

Thanks,
Malcolm
 

Sorry, wrong info, I have never needed to NOT save the changes I just made before closing the form. I normally might leave the old code (commented) and run with the new one, but I never opted to say "run this and if it is ok I'll save it", too risky.
Perhaps someone else has a suggestion.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,

I understand the reasoning behind VFP's auto-save/compile behavior. The reason I would want to disable this behavior is so I could pre-process snippet source code (before VFP compilation) as part of a project hook. I can do this for PRG files, but not for any of the VFP designer (form, class, etc) based code.

Thanks for your help anyway,

Malcolm
 

Malcom,

Perhaps you could temporarily bracket the code between TEXT and ENDTEXT. Then remove that after you have saved the code and are ready to run. It's not at all elegant, but it might be a solution if you can't find anything better.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

Perfect! Here's my version of your solution.

Code in my general .h include file

Code:
#define BEGINPLUS text to _NULL noshow
#define ENDPLUS   endtext

Example of BEGINPLUS, ENDPLUS "keywords" in use

Code:
BEGINPLUS

<enhanced code here - ignored by compiler>

ENDPLUS

Cheers,
Malcolm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top