Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run time Menu
Message
 
 
To
26/02/2003 09:17:59
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Title:
Miscellaneous
Thread ID:
00758030
Message ID:
00758358
Views:
37
Paco,

See changes in the code below.
SCAN 	&& Scan is better way to work with tables
	DEFINE BAR j OF reports PROMPT (ALLTRIM(repgroup.groupnarr)) ;
		MESSAGE (repgroup.groupnarr)

	cMenuOption = ALLTRIM(repgroup.groupnarr)	&& cng

	ON BAR j OF reports ACTIVATE POPUP (cMenuOption)  && cng
	i = 1
	SCAN FOR ri_menugrp=repgroup.groupref		&& cng
		 DEFINE POPUP (cMenuOption) ;
                        MARGIN RELATIVE SHADOW COLOR SCHEME 4
		 DEFINE BAR i of (cMenuOption) PROMPT (ALLTRIM(ri_wtitle))	&& cng
		 runcommand = alltrim(ri_command)
		 ON SELECTION BAR i of (cMenuOption) &runcommand    && cng	
		 i = i + 1
	ENDSCAN	
	select repgroup
	j = j + 1
ENDSCAN
>Hi everybody,
>
>One of my system has the ability to use user defined menus. The main option 'Reports' has already been created in the system main menu, the user is allow to created submenus in the 'Reports' option, then attached differents options to these submenus. The piece of code I'm using is the following...
>><<<...>>>
>
>select repgroup
>j = 1
>Do while !eof()
>	DEFINE BAR j OF reports PROMPT (ALLTRIM(repgroup.groupnarr)) ;
>		MESSAGE (repgroup.groupnarr)
>	cMenuOption = "repgroup.groupnarr"
>	ON BAR j OF reports ACTIVATE POPUP &cMenuOption
>	Select Camisrep
>	seek(repgroup.groupref)
>	i = 1
>	do while(ri_menugrp=repgroup.groupref) and !eof()
>		 DEFINE POPUP &cMenuOption ;
>                        MARGIN RELATIVE SHADOW COLOR SCHEME 4
>		 DEFINE BAR i of &cMenuOption PROMPT ri_wtitle
>		 runcommand = alltrim(ri_command)
>		 ON SELECTION BAR i of &cMenuOption &runcommand	
>		 i = i + 1
>		 skip
>	enddo	
>	select repgroup
>	j = j + 1
>	skip
>enddo
>
><<<...>>>
>
>...the code in within the second 'Do while' loop doesn't work, VFP return sintaxt errors. I have tried different approaches but none works...
>
>Any ideas, please...
>
>Paco Calvente.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform