Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application error: can't find mpr file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00033460
Message ID:
00033754
Vues:
44
Guys,

First, I wasn't using macro substitution and the menu was included in the project. The application worked fine in
development, but then again both the MPR and an MPX were in the the default directory. However, when the
application was installed, I got the "cannot find..." error. In my case, and I don't know if this applies to Jeff's
question, there were other things going on as well.

The application was loaded by a startup EXE. The EXE contained the main procedure file. When the user
selected an application, the default directory was appropriately changed, the start menu was pushed on the
stack, the menu was run and control was returned to (shudder) the FOUNDATION READ in the EXE.

That's what I think caused the problem. For some reason, even though the menu had been run, when the DO
...IN MPR was encountered, the EXE file knew nothing about it. The solution, of calling only PRGs and SPRs
from one these menus, wasn't all that much of a hassle.

I'm wondering if the same thing might apply with READ EVENTS in a EXE. If an APP file with a menu is run
from it, it might cause the same type of problem.

George

>George,
>
>Two additional things for you to consider...
>
>1) IF you are invoking the menu using a "macro", then the Project Manager would not 'miss' this at build time (since it has no way of knowing at that time). The simplest way to overcome this is to add a dummy, never-to-be-executed procedure/function, probably at the end of your MAIN prog., to simply do a DO realmenu.mpr. This will cause the PM to bring it in at build time.
>
>2) Others have reported that including a component, but in the "wrong" place, leads to trouble too. Are you sure that the menu in question is actually included in the Menu section of the PM's list??
>
>Good luck,
>Jim N
>
>>> >I created an application that uses a customized menu. When I build the
>>> executable, run the setup wizard, and then install the application on my
>>> PC, the menu works fine. But when I install it on the client's PC, I get an
>>> error: Can't find file c:\apps\prepay\menus\prepay.mpr.
>>> >
>>> >Isn't the menu incorporated into the executable? Why is my application
>>> looking for this file? If I rename the directory my development files are
>>> in and then try to run the program on my PC, I get a similar error, only it
>>> is looking for the MPR file in my development directory and not the
>>> installation directory.
>>
>>Are you sure that the menu is included in the Project? If it is, ensure
>>that it has not been marked as 'Excluded'.
>>
>>Do you always run the .APP, or do you sometimes run the main procedure
>>in the project? If you _never_ run the main procedure in the project,
>>then look for the file:
>>
>>c:\apps\prepay\menus\prepay.MPX
>>
>>This would indicate that the menu was compiled by FoxPro outside of the
>>application build and that you are running it directly, rather than
>>through the application.
>>
>>--
>>
>>--
>>Paul Russell
>>Software Kinetics Ltd. | Phone: (902) 481-4582 Fax: (902) 468-3679
>>201 Brownlow Avenue | Office: Paul.Russell@SofKin.ca
>>Dartmouth | "The best evidence that time travel will never
>>be
>>Nova Scotia, Canada | possible is that we have not been invaded by
>>B3B 1W2 | hordes of tourists from the future." - S.
>>Hawking
>>
>>"Use technology because it's appropriate -- except in the case of 'Java'
>> then just use it 'cause it's cool!" - Paul Russell
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform