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!

VFP IDE - Odd thing saving files as...

Status
Not open for further replies.

GriffMG

Programmer
Mar 4, 2002
6,335
FR
I use the VFP IDE to manage and edit the web pages of one of my systems, because I like the environment so much.

Right now I'm making a bunch of help pages each with a similar name, probably not the most efficient approach I know, and this involves
opening an existing file 'helppdreviewer.asp' for example, then saving it as 'helppdnameref.asp' - then editing it.

Just recently it (the IDE) has been doing something a bit odd... instead of saving just 'helppdnameref.asp' it (the IDE) is creating another file called
'helppdnameref.fpt' and then 'thinks' it has added this to the project (until you exit the IDE and come back in) and the .asp file is no longer text
but looks like the contents of a .dbf file.

Anyone else ever seen anything like this?



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
I never expereinced the text editor saving as DBF. I did experience the inverse, the wrong file association to cause VFP to try to execute non prg code files and compile them to FXP files.

You might fix your VFP file associations with
Edit: Then, as you edit non VFP code - you should check options and see, whether you have turned on "compile before saving" in the IDE tab of the options.

Bye, Olaf.
 
Thanks Olaf,

It's not an associations thing, coming out of the IDE clears it and it doesn't do it all the time.

Could it be a number of files thing? There are 700 odd code files?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
No, I've never seen anything like this either.

Griff, which editor are you using in VFP? The code editor (invoked with MODIFY COMMAND) or the file editor (MODIFY FILE)? (I know they are really the same thing, but there might conceivably be some difference in how they save files.)

Also, do you see the same behaviour regardless of how you invoke the editor (command window, project manager, etc.)?

I doubt if the fact that you have 700 odd files is a factor, but who knows?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Morning Mike

I'm invoking the editor via the 'Modify' button on the IDE in the Project Window, the command window shows 'MODIFY COMMAND' in each case.

I've done it twice this morning without incident - perhaps I was tired yesterday...

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Presumably you switch of Intellisense when editing ASPs? That's got nothing to do with your problem. But you probably don't want automatic capitalisation of VFP keywords, for example.

I often use VFP for editing HTML files, but I generally use MODIFY FILE rather than MODIFY COMMAND, for that reason.

The reason I asked whether you used the project manager to launch the editor is that you mentioned that FPT files sometimes appear in the project. I wonder if it would make any difference if you launched the editor from the command window, without the project being open. Just a thought.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi

No, I leave it on most of the time, I have a little wrinkle set up for the most common problem - END IF

It does annoy once in a blue moon if I'm writing some narrative and it wants to capitalise AND OR IF and NOT, but
I have learnt to put a dot after them then go back and sort later!

I MAY have found the problem, I think I'm not accurately connecting with the .ASP I am trying to save before hitting the File, Save As combination
so it's saving the PROJECT as the .ASP file... I did say I thought I was tired!


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
it's saving the PROJECT as the .ASP file.

Yes, I wondered about that when I first saw your post. In fact, I tried doing a Save As on the project, and then opening the resulting file in a text editor. And, yes, it does look like a DBF - containing the names of the files in the project.

All that makes sense. It still doesn't explain how you came to see an FPT file in the project, but never mind.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I'm guessing the FPT is normally has a file type associated with the PJT file?

Anyway, coffee has proven once again to be the answer.

Thank you people for your thoughts.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
PJX corresponds to DBF, PJT to FPT, correct. The Project file has no index file equivalent, you still find further files after compilation, eg VBR, TLB, APP, EXE, they all are connceted to the compilation, though, not to the project itself, VBR and TLB are about COM Server (VBR - unsure, TLB - Typelib), APP and EXE obvious by your choice in the build dialog. Then the ref files, a DBF+FPTüCDX which are about Code References.

If you Save As and choose an existing file, you can of course get all kinds of wrong results. I never save my project at all, the Save dialog is even disabled, you can only save a copy of your project with new name and location via Save As. Saving of any changes (added/removed libraries, etc) is done via the project manager only.

Bye, Olaf.

 
The below are examples of standard tables, projects and classes... which under the hood are all tables with associated memo files.
DBF - FPT
VCX - VCT
PJX - PJT

Another side note not directly related to the above issue... I would periodically open a project's .PJX as a table then PACK and close in order to clear the .PJT bloat.
 
I'm thinking that VFP defaults to the .FPT extension when saving a .PJX as a .ASP accidently so creates a .FPT file.

All starts from working too long, too late and without enough caffeine.

Thank you all for your help.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Yes, just tried that. Saving a PJX as ASP it first only creates a ASP file (and doesn't care and change to a PJX extension), when you then close the project manager it also creates an FPT. So the project memo file doesn't get the normal PJT extension, as the PJX doesn't have the normal PJX extension.

So mystery resolved.

I think that's valid more generally. I already knew you can save dbfs with any extension, but never looked what happened with any other file type actually being a DBF. Secondary files only get their corresponding extensions, if the main DBF file has its special extension, otherwise saving fpt and cdx file part defaults to their normal extensions, that's all there is to it. That also means if you try to disguise using DBFs by giving them other file extensions you can't disguise FPT and CDX.

Bye, Olaf.
 
Db Mark said:
I would periodically open a project's .PJX as a table then PACK and close in order to clear the .PJT bloat.

Good plan. But you can save yourself a few seconds by opening the project normally, and then selecting Clean Up Project from the Project menu.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 

MikeLewis said:
DbMark said:
I would periodically open a project's .PJX as a table then PACK and close in order to clear the .PJT bloat.

Good plan. But you can save yourself a few seconds by opening the project normally, and then selecting Clean Up Project from the Project menu.

Yes, but I was also cleaning up some old archived projects that had been moved into archives and opening the project would have triggered many missing file alerts. In short, yes yours is the better way if possible. Some of those had PJTs that shrank from 10-15 MBs to maybe 10-30 KBs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top