General information
Category:
Menus & Menu designer
Title:
Question on BAR() and *.mpr - VFP 3.0 and FP (Dos)
Hi! :) Pardon me for the extrememly long posting....
I have this wierd problem. When I want to execute a *.pgr (via submenu option from the menu bar), I would like to return to that previous submenu option. I use the BAR() and a variable to keep track. It works fine until when I sometimes switch from one submenu option to another submenu option quickly (mouse) I sometimes call the wrong submenu and worse when I return to the previous option, it says something like : "menu index must be a positive number" - this I checked out is because the variable I used to keep track of the BAR() returns .f.
Heres the psudocode:
menu calls file.pgr via procedure
-inside the menu procedure-
DO pre_pgr_proc;
DO file.pgr
&&DO post_pgr_proc;
-file.pgr-
nBarno = BAR()
.....executing other pgr files..(also changing the menu bar)
.....redrawing previous menubar
ACTIVATE POPUP (popname) BAR nBarno
I think that maybe because of the redrawing of the menu, when I move my mouse to the other submenu option, BAR() fails???
I am porting this code from FP DOS to VFP 3.0
A question, is it true that if we define a variable within a *.pgr file, the variable is automatically released once we come to the end of the *.pgr file. The prg file has no PROCEDURE / FUCNTION definitions. As in the case of nBarno, does post_pgr_proc have access to nBarno?
Does anyone have any suggestions? Any help would be very much appreciated!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only