Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I obtain names of all popups
Message
From
22/02/2010 13:42:56
 
 
To
22/02/2010 05:01:38
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01450164
Message ID:
01450280
Views:
37
Hello Thomas,

Thank you for your detailed reply. I think though that I didn't explain myself well enough. I do not have access to the startup code that builds the system's menus. I am using an Accounting System - Accountmate, which only exposes part of the source code. The code that builds the menus (from a dbf) is hidden from me. So the popups are already built and defined by the time I have my entry point into the code where I need to modify their contents. Therefore, unless I am misunderstanding what your code does, I don't think I would be able to utilize it.

>Hi David,
>
>could you (instead of n-popups) create just one popup on the fly and dismiss it after usage, as you already generate them programmatically with db metadata.
>
>As long as you only use one popupmenue there is no need for finding others ;-)
>
>Perhaps this code snippet gives you an idea. Surely you would have to modify the Add2Popup calls to take care of your db content, but that should be done easily.
>
>Just my two cents ;-)
>
>
>MakePopup()
>Add2Popup([\<1 My First Selection],   1,[-])
>Add2Popup([\-],                    9998,[-])
>Add2Popup([\<0 Cancel],            9999,[-])
>ShowPopup()
>
>IF VARTYPE(PopUpMenueSelection) = [N]
>	IF PopUpMenueSelection = 1
>		myHandler.DoMyFirstSelection()
>	ENDIF 
>ENDIF 
>
>FUNCTION makepopup
>	DEFINE POPUP Pop1 shortcut relative from mrow(), mcol()
>	PUBLIC PopupMenueSelection
>ENDFUNC 
>
>FUNCTION add2popup
>LPARAMETERS vPrompt, vValue, vMessage
>	DEFINE BAR (vValue) OF Pop1 PROMPT vPrompt MESSAGE vMessage
>ENDFUNC 
>
>FUNCTION showpopup
>	ON SELECTION popup pop1 PopupMenueSelection = BAR()
>	ACTIVATE POPUP Pop1
>	RELEASE POPUP Pop1 extended 
>ENDFUNC 
>
>
>>I know about most or all of the menu functions like prmbar(), getbar(), popup(), etc.
>>However these don't appear to be getting me what I need.
>>
>>I would like to get a list, collection, array, whatever, of defined popups. Is this possible?
>>
>>The reason I need this is because I have an application for which I only have 'limited source'. The menus are built programmatically from a database, and there is no mnx or mpr. I want to be able to remove or add menu items on the fly, but I can't figure out a way to do this if I don't know the names of the popups.
>>
>>e.g. release bar 1 of MYPOPUP
>>
>>but I don't know the name MYPOPUP.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform