Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I obtain names of all popups
Message
De
22/02/2010 05:01:38
 
 
À
22/02/2010 00:25:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01450164
Message ID:
01450178
Vues:
68
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.
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform