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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memo file (for menu) is missing or invalid

Status
Not open for further replies.

sw1202

Programmer
Jan 16, 2007
18
US
Hello,
I suddenly found myself in trouble when I tried to modify my menu. I got this message "Memo file main_menu.mnt is missing or invalid". I recovered the files from backup, it still would not let me open. I even reinstalled VFP, it's no help. And this is not all, out of four projects that I maintain, I can only modify menu of one project! Recreating a menu from scratch is painful (lots of sub menu) and I have three bad ones :( Please help!
Thank you in advance.
sw1202
 
Could you be dealing with a version issue? What version of VFP are you working in? What version were your menus last edited in?

Tamar
 
I have been using VFP 9.0 all along.
Thank you.
 
Do you have older backups? mnx/mnt is a pair of files making up a DBF with meta data about the menu. Your mnt surely isn't missing, but corrupt and when you say you recovered it from backups, then you already backuped a corrupt mnt file.

A decent back strategy keeps a bunch of versions, not just overwrites the previous backup with the new file version, so get an older version that works and you just need to redo some parts of the menu.

Bye, Olaf.

 
As well as the MNX and MNT files, you presumably also have the MPR files. To clarify, MNX and MNT files are the ones that the menu designer uses directly; you open them in the designer to modify the menu, and then save them. The MPR is the file that the menu designer generates. It is the one that you actually run from within your application. Because the MPR is just a text file, it won't be corrupted.

My point is that a corrupted menu won't prevent you building or running the app. Nor will it prevent you from modifying the menu. But instead of modifying the menu in the designer, you do so by editing the code in the MPR. It is just normal FoxPro code, and the relevant commands are all documented in the Help.

Obviously, it will be desirable to recover the MNX/MNT eventually so that you will be able to continue to use the designer. But it is not critical for the on-going maintenance of the project.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
It's surely worth mentioning, but I also think maintaining and extending the menu with the menu designer is what sw10202 is used to and should be able. But indeed the MPR code can be your life saver in finding out what commands to add back to which menu or submenu items. I wouldn't go for skipping the menu designer and instead continue maintenance of the MPR manually. It's unclear which version of that file exists and whether it is complete, but you should look for the file with that extension, sure.

Bye, Olaf.
 
Thank you all for your help and direction. I usually have lots of backup versions, but somehow for these, I didn't do it :( Hopefully I will be able to get an older version from last month backup and build on from there. By the way, do you know what could cause the memo file of menus to be corrupted? Strangely the menus for three out of my four projects got corrupted. This is the first time it happens to me in years. I am nervous about the last project, it's a big one (yes, I made another backup on this one yesterday :))
Thank you again.
sw1202
 
If it happened in three out of four projects and the fourth is the one you didn't touch yet, I would also fear it happening again. In such a case of 100% damage the first thing I woudl check is hardware errors. Is the drive you use old? Maybe it should be renewed? Is it brand new? Maybe it has a production fault.

Bye, Olaf.
 
Have you tried opening these with the USE command? Since they're just renamed DBFs, it would be interesting to see whether the issue a corrupt DBF, or something specific to menus.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top