Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A crasher and goofs with menus
Message
From
12/08/2006 14:49:15
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Title:
A crasher and goofs with menus
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01145066
Message ID:
01145066
Views:
56
I wish Milind would help get Connect up and going so I could report these bugs properly. Anyway...

Bugs #1: An invalid file added to a project as a Menu file will crash VFP on build and build error messages are out of synch with the actual error.

1-A: I inadvertently added a CONFIG.FPW file to my project. Clicked build with APP and Recompile all selected. Got the error "CONFIG.FPW is not a table".

1-B: Following along from 1-A, click OK. You go to the VFP debugger which is in the middle of the GENMENU error handler routine. (FWIW I'm using the Debugger frame for the Debugger). I click on the "Stop" button and close the debugger. I repeat the same steps and, eventually, it will C0000005 VFP. It crashed the very first time on one occasion which is he only way I found the bug.

Bug #2: In the Project Manager, go back to the invalid entry in Menu and click Modify. Again, the "Not a table" error.

Bug #3: Trying to add an "MPR" file (generated menu code) to a project using ActiveProject.Files.Add fails with no error and the file is not added. Here's the repro code:

**************************
SET SAFETY OFF
DELETE FILE foo.p*

TEXT TO cCode NOSHOW
X=1
ENDTEXT
=STRTOFILE(cCode,"foo.prg",0)

TEXT TO cCode2 NOSHOW
DEFINE MENU FOO
ENDTEXT
=STRTOFILE(cCode2,"dumdedum.mpr",0)

CREATE PROJECT foo NOWAIT
_VFP.ActiveProject.Files.Add("foo.prg")
_VFP.ActiveProject.Files.Add("dumdedum.mpr")
***************************

Bug #4: System menu File -> Exit and File -> Close behaviors are very weird in Top-Level form EXEs.

If you have a Top-Level form with no screen (SCREEN=OFF in CONFIG.FPW) and have a menu using the system menu items for Close and Exit, the Close menu itemis enabled but Exit is not. However, both hotkeys, Ctrl-F4 and Alt-F4 respectively, will close the form (and application by default).

This violates Windows UI as Ctrl-F4 shouldn't close an entire application *and* Alt-F4 should be enabled if using the system menu item.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Next
Reply
Map
View

Click here to load this message in the networking platform