Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error with form
Message
 
 
À
04/01/2002 05:16:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00600658
Message ID:
00600668
Vues:
15
Hi!

You can also repair the problem.

Do following steps. One warning - make a backup of the form files (SCX and SCT files) before doing any changes below.

1. Open the form file (scx) as a DBF file: USE MyForm.SCX in 0. If it could not be opened, then the file is corrupted and you need to use some recovery tool. There are some recovery tools here in Downloads section. If file opened Ok by USE command and you can browse it, use next steps.

2. Open the form file (scx) as a DBF file: USE MyForm.SCX in 0. Browse it or just use "replace" command to clear all compiled object code for all methods in that file (There are memo fields: one contains source code, another - compiled code.) After this close the file and recompile it by using COMPILE command. Try also to use PACK command before recompiling. This usually helps. If not, see next steps.

3. Open the SCX file by Class Browser. If it is opened ok, by using View Source Code button you will see a complete source code. Copy it to PRG file. Most likely it will not run from PRG because ADD OBJECT inside of DEFINE CLASS statement alows only 1 level deep inclusion of objects in containership tree. However, at least you will have all code and property settigns handy, so will be able to re-create the form.

4. If Class Browser was not capable to open the form either, open it as DBF and try to figure out whats the problem. You will have to learn the structure of the SCX/VCX file for this and learn how objects and their PEMs are stored in the SCX/VCX file, that can take some time for you. Look for some sort of recursive references or similar stuff.

5. If you still was not able to find a problem, process from step 1 for all class libraries and classes used by that form. The problem might be in some class, not in the form itself. TO determine more quickly which class is offencive, open the form as in step 4. and change information in its records to map objects to default VFP class insted of your custom class. Doing this one by one will show you which class caused the problem.

HTH.

>I've got a system-error(not enough mem.) and now I think a form-file is corrupt;
>I can click on it in the project-manager but nothing happens (even no error like 'file is corrupt').
>
>Has anybody had did also, and can i recup some source code .
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform