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!

Debugger question

Status
Not open for further replies.

Goofus828

Programmer
Nov 9, 2005
127
US
Hi all,

The application I am working is has its own system menu not the default VFP one.

Question is, when I am in the DEBUGGER tracing code and I click FIX is there anyway to reset the menu back to the VFP default one automatically. Like a trigger or something.

I am so focused on fixing the error that when I am done fixing the error I instinctively press ALT-F-S, but this is absent in the Application's menu so I get another error!

I know I can type the command to reset the menu back but I'm getting lazy more efficient in my old age.

Thanks in advance - Josh
 
Hi Josh,

I can't think of an automatic way to do this. Maybe someone else can.

What I would do is to type the SET SYSMENU command in the Command Window the first time I need to do it. After that, just click on that line in the Command Window and press Enter. I don't find that too onerous.

The other thing I do is to keep the system menu active while I'm in the development environment. In other words, I only hide it when the application is running from an EXE. That way, the issue never arises.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Another option - which I use quite often - is to define a hot key, like say, F12.
You could always add the default system stuff to the menu that is only active when not in the .exe version.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks guys, Mike I like your suggestion with keeping the menu alive during development.

Dave - this program turns the function keys on and off a various points in the code( very frustrating!)

 
You could define a class in your app's startup code which looks for a file like "developer_machine.txt" and if found, installs a timer object which once a second redefines the function key you want/need to the "SET SYSMENU TO DEFAULT" key, then you'll never have to wait more than a second or so to do it. You could also ALWAYS create the timer, and then have the timer code look to see if that file exists, and that way you can only have it do its thing WHEN the file exists, which would allow you to copy some files into / out of a particular directory to enable things in your app.

Hope this helps.


Something like:
...
IF FILE("developer_machine.txt")
_screen.addobject("_keytimer", "keyTimer")
_screen._keyTimer.enabled = .t.
ENDIF
...

DEFINE CLASS keyTimer AS Timer
Interval = 1000
PROCEDURE Timer
ON KEY LABEL ALT+F12 SET SYSMENU TO DEFAULT
ENDDEFINE

Best regards,
Rick C. Hodgin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top