Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get The Heirarchy of a Cascading Menu
Message
From
25/09/2010 15:40:49
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
25/09/2010 04:51:16
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01482694
Message ID:
01482727
Views:
66
>Dear All
>
>Assume I have a menu which cascades 4 Levels. The 1st prompt is called 'Prompt 1' which when highlighted cascades to a 2nd Prompt called 'Prompt 2' which when highlighted cascades to the 3rd prompt called 'Prompt 3' which when highlighted cascades to the 4th and last prompt called 'Prompt 4'. I know I can use the prompt() function to give me the prompt of the last option selected i.e "Prompt 4'.
>How can I go ahead and get to know that the 3rd was 'Prompt 3', the second 'Prompt 2' and the 1st 'Prompt 1' in the heirarchy ? In other words how can I get the Prompts of the other three items in the heirarchy given the last one ? The Menu is not an .MNX but defined with Define PADs and Define POPUPS
>
>I need to know this for some audit procedure that I am writing

If you're defining your menu via any sort of metadata, you can define it so that on each bar selection a procedure is run with the PK of the metadata's record, or some other parameter that you can know when you're building the menu, or some other way to identify the pad's hiearchy. Maybe what Tamar said,
on exit bar xxx do MenuAudit with "prompt1.prompt2.prompt4", datetime()
Doing that at runtime with existing code (i.e. without these extra commands), using VFP's menu related functions won't get you far, because each works only at the currently selected level.

If you're defining your menus in a prg, not from metadata, then you'd have to go through all of the define pad/bar and add this (as an additional parameter, perhaps) to each procedure you run On Selection Bar/Pad. Which is why I never build my menus from anything but metadata - much more control.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform