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!

How to interfer with Beautify 1

Status
Not open for further replies.

mkendi

Programmer
Oct 21, 2000
82
TR
I there a way to tell Beautify, not to interfere with a special word?
My problem is:
My beautify-settings changes all keywords to uppercase.
Now ShowWindow is a Vfp Keyword.
But also a (case sensitiv) function in Win32Api.

Best regards
 
mkendi,

Short answer is No.

The only solutions I can think of are:

- Comment out the lines containing ShowWindow before you beautify, or

- After you beautify, run a find and replace to change all instances back to the correct case.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Thanks Mike
I will move this part of code into a single class.
 
mkendi,

I had a detailed analysis on beautify in this forum at one time and how to effect it by modifying the tables that it uses in order to figure out what is a keyword and what isn't and how to indent stuff. I explained whtat all the codes were in the code field of fdkeywrd.dbf. Unfortunately the thread was deleted. Frustrating.

The tables you want to look into are fdindent.dbf and fdkeywrd.dbf and you'll find them where your VFP is installed. The one that is probably of must use to you is fdkeywrd.dbf. After making a backup of that table (don't proceed without doing this first), go in there and delete the record that has SHOWWINDOW in the Token field. That should keep Beautify from messing with it anymore.

boyd.gif

 
Hi Craig

it's late in the evening, so I will test it tomorrow. I am eager to give you a star!
 
Hi Craig

I couldn't find fdindent.dbf
I use Vfp8, maybe you are using another one.

But fdkeywrd.dbf I was able to find twice. One in
..\Tools\Analyzer\fdkeywrd.dbf
and the other in
..\Wizards\fdkeywrd.dbf
Both are exactly the same.
Before I start a try-and-error cycle:
Do you know if I have change both, or only one?
 
I have quite a few versions of VFP, and yes VFP 8 is among them. I believe the other table is included with the xsource that comes with VFP. I wish that thread were still here... I'm looking for my hard copy of everything I figured out, if I find it I'll post it. I can see part of the thread in a Google search. [smile]

Anyways, the one you want is that one you found in the wizards folder... either delete the record or you can just change the token to something like *NOT*ShowWindow in any event the beautifier will stop messing up your ShowWindow API call (which is exactly the reason I went to figure out how I could change beautify's behavior in the first place).


boyd.gif

 
Bad news.
First I changed in ..\Wizards\fdkeywrd.dbf ShowWindows to ShowWindow_old.
Again Beautify strikes and changed my word to uppercase.
Exit and reenter Vfp, reindexing fdkeywrd did not changed this behavior.

Then I tried it out with ..\Tools\Analyzer\fdkeywrd.dbf: same result.

Then I scanned my Vfp folder and subfolters to find a file which containes 'ShowWindow':
but I could only find this two fdkeywrd.dbf

So your tip is the right one. Maybe I am doing something wrong?
 
Yessssss, that's it.
I changed it to XXXWindow and now, during typing Vfp changes the color to blue, but the beautify tool does not change it.
Thanks a lot!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top