Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Menu not compiling in EXE VFP 5.0a
Message
De
21/08/1997 18:11:02
Monte Murdock
Universal American Mortgage Company
Clearwater, Floride, États-Unis
 
 
À
21/08/1997 17:18:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de projet
Divers
Thread ID:
00046177
Message ID:
00046305
Vues:
38
>>>>>>>>>>>>>Correct me if I am wrong but isn't a menu suppose to compile when included in the Project Manager.
>>>>>>>>>>>>>
>>>>>>>>>>>>>I compile the exe, run the exe and everything runs fine until it gets to the method which run the .mpr file then it tells me that it cannot find the file.
>>>>>>>>>>>>>
>>>>>>>>>>>>>Any ideas anyone?
>>>>>>>>>>>>>
>>>>>>>>>>>>>MOnTe
>>>>>>>>>>>>
>>>>>>>>>>>>how are you trying to call the menu? is it in a top level form or the main vfp window?
>>>>>>>>>>>>i think you have to generate the menu from the menu designer before you compile but i could be wrong.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>I generated the mpr from the menu designer before compiling the exe. The menu is being called from an application object.
>>>>>>>>>>
>>>>>>>>>>are you sure it's not excluded from compile? if it is, it will have a little circle with a slash across it in the project manager.
>>>>>>>>>
>>>>>>>>>I triple checked.
>>>>>>>>
>>>>>>>>I had the same problem and it was my path. I had the same menu file in
>>>>>>>>two different locations.
>>>>>>>
>>>>>>>I tried hard coding the path and I searched for other menu files in the same place and it still is looking for the file instead of compiling the .mpr file in the exe.
>>>>>>
>>>>>>I am sure it is a PATH problem and not a problem with vfp50a..
>>>>>>What do you think Edward..
>>>>>
>>>>>So far, nothing.
>>>>
>>>>I hard coded the path when calling the .mpr file for example:
>>>>
>>>>lcFileName = "S:\CBFPTS\MENUS\PTSMENU.MPR"

The reason that the method domenu did not work was because I had the following line in the parent class:

IF NOT FILE(lcFileName)
this.FileNotFoundMsgBox(lcFileName)
RETURN .F.
ENDIF

Don't ask me why?

MOnTe

>>>>DO (lcFileName)
>>>>
>>>>It still will not compile the above file in the exe. When the exe gets to the point of executing that part of the program it looks for the file.
>>>>
>>>>MOnTe
>>>
>>>The compiler will never see it when you call it with macro substitution as you have done here. if you need to use the above method try adding the following code to make sure the compiler see's the menu.
>>>
>>>if .t. = .f.
>>> do S:\CBFPTS\MENUS\PTSMENU.MPR
>>>endif
>>
>>
>>The main form is called the same way and it runs wonderfully. Why would the form run and not the menu?
>>MOnTe
>
>I really can't say. I just know that using the method you are using that the menu would not be added to the project unless manually entered telling me that the compiler does not see it. The compiler is not going to search strings to see if they contain calls to other modules. I suspect that somewhere in your code that you reference the main form explicitly. Menu's differ from forms in the respect that forms contain all of the source and object code. menu's must generate an mpr file wich is basically the same thing as a prg file.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform