Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for the MPX
Message
 
To
17/12/1997 09:32:49
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00065992
Message ID:
00066535
Views:
48
>>>>>>>>>I added my menus (MNX) to my Project under the Menu category, but when the application is run on my user's machine, it asks for the MPX file. Why? I shouldn't have to distribute this.
>>>>>>>>>
>>>>>>>>>Thanks
>>>>>>>>>Elyse
>>>>>>>>
>>>>>>>>
>>>>>>>>First -- Modify Menu MyMenu
>>>>>>>>
>>>>>>>>On the VFP menu bar click on Menu, then Generate. This will generate the menu code (.MPR). Then COMPILE MyMenu.MPR which will create the MyMenu.MPX which is what you distribute.
>>>>>>>
>>>>>>>Are you saying I have to distribute the .MPX files along with my .EXE?
>>>>>>
>>>>>>Right. MyMenu.mnx is a table, and MyMenu.mnt is the associated memo file. When you create a menu through the menu designer, you must generate the menu. You call the menu with a DO MyMenu.MPR or DO MyMenu.MPX (compiled version of .MPR).
>>>>>>
>>>>>>I usually have a .PRG that does some setup sork, then it calls the Menu with a DO command, followed immediately by a READ EVENTS command. I have an EXIT option on my menu bar that has a CLEAR EVENTS to return control back to my .PRG which cleans up and quits the application.
>>>>>
>>>>>I'm afraid I don't follow your point, Mark.
>>>>>I don't distribute menus. If their location is in the path, and they are included in the project, then they don't have to be included any more than a .scx file has to be included.
>>>>>Elyse- I had trouble with this initially also, but got it worked out eventually.
>>>>>One thing that through me for a loop... DO MENU will accept the .mpr filename in quotes or by itself. In quotes, it gave me the message you are getting. By itslelf, it worked. If this doesn't work, and you are sure that the file is in the path, play around with the calling syntax. You shouldn't have to distribute your menu files.
>>>>
>>>>I do not have to include the menu either. Her problem was she did not generate the menu (.MPR) or compile such (.MPX). Her original question stated she included her menu (MNX) which is the table that the menu is generated from. My point was she had to generate and compile, etc., etc.
>>>
>>>Mark,
>>>
>>>She must have compiled and generated the code or it wouldn't ask where the MPX file was.
>>>
>>>George
>>
>>I suggest she did not. I took from her question that she manually added the .MNX in the Project Manager. Because the .MPR/.MPX was never created would be why the .MPX never was compiled into the .EXE, therefore, the error message that the .MPX was not found.
>
>The .MPR is created when I build the project. I see that some of the menus also have .MPX's but not all. I didn't explicitly create these so I don't know why some have and some don't and I don't know which are the problems.
>
>Elyse

It's been my experience, that when you compile a project, the object code (MPX) is not written to the disk. When you execute an MPR it's created. You mentioned that you're getting a dialog (at the site) asking where the MPX is. This indicates to me that the LOCFILE() function is being called by a reference to a procedure in the menu file. During development, if the MPR is in same directory or on the FoxPro path, what happens is that it is located, compiled and executed. However, since this isn't the case at the site, the dialog appears. This occurs because once the menu is run, the only thing left in memory is the menu bar references. Menus don't work like procedure files.

As I mentioned, the only resolution to this is to change the calls to the menu procedures to calls to programs.

hth,

George
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform