Hey there Al,

A while back - I started trying to implement something for a client -
for whom we created a specific Windows version of our system. I was
attempting to built in user permissions levels - to stop users from
getting access to items on the menu which they are not supposed to be
allowed to use. I did NOT - however - get a chance to finish this
system. But, I figured you may be able to use this code. Mostly because
I figured out a way to do pretty much what you were looking for -
although I am SURE it is NOT the way you would have expected.

You see - a while back - in mid to late 2009 I asked a similar question
on here. But, it seems that it could not be done the way I had hoped. So
- I started building this system - that I could access the menu system
names - but, by DIRECTLY opening up the Menu system as a DBF file. 

So - I hope this helps - and I'd sure be interested to know if you were
able to use my techniques as outlined below. What I am including here is
kind of a snippet of the code - and I included the procedures that I
created as well. 

Goodluck!
-K-

**********************************************************************
* KHW - 10/16/09 - Menu System Access Based upon User Allowed Access
**********************************************************************
* The following Var definitions and Coding have been implemented to 
*       properly limit user Access to the FS Menu & System
*       based upon the User who logs into the system.
* The primary Array is Menu_Access, with Element references being 
*       inserted into the SkipFor parameter of the Menu System.
**********************************************************************
PUBLIC  Menu_Access  
Max_Main_Menu = 15
Max_Drop_Down = 20
DIMENSION Main_Menu_Opts(Max_Main_Menu), ;
        Sub_Menu_Opts(Max_Main_Menu, Max_Drop_Down), ;
        Menu_Access(Max_Main_Menu, Max_Drop_Down)
Main_Menu_Opts = ""
Sub_Menu_Opts = ""

* Open the FS system MainMenu as a Database - to 
*       retrieve all the menu option wordings
SELECT 0
USE menus\mainmenu.mnx SHARE

* 1st - Get all the Top-Level Menu options...
SELECT MainMenu
SCAN FOR ALLTRIM(LevelName)="_MSYSMENU" AND ObjType=3
        xMainopt = Strip_Chars(Prompt)
        xMenuOptNo = VAL(ItemNum)
        Main_Menu_Opts(xMenuOptNo)=xMainopt
ENDSCAN 

* 2nd - Get all the Sub-Level Menu options...
Total_Main_Opts = xMenuOptNo
FOR I = 1 TO Total_Main_Opts
        CurrOpt = Strip_Blanks(ALLTRIM(Main_Menu_Opts(I)))
        CurrOpt = UPPER(LEFT(CurrOpt,10))
        LOCATE FOR UPPER(ALLTRIM(LevelName))=CurrOpt AND ObjType=2
        IF FOUND()
                TotSubOpts = NumItems
                FOR J = 1 TO TotSubOpts
                        LOCATE FOR UPPER(ALLTRIM(LevelName))=CurrOpt ;
                                AND ObjType=3 AND VAL(ItemNum)=J
                        IF FOUND()
                                Sub_Menu_Opts(I,J) = Strip_Chars(Prompt)
                        ENDIF 
                ENDFOR 
        ENDIF 
ENDFOR 

* Since the Menu options have been retrieved - will 
*       now close the MainMenu screen file
SELECT MainMenu
USE 

**********************************************************************

***********************
PROCEDURE Strip_Chars
***********************
PARAMETERS xMenuOpt
CleanOpt = ALLTRIM(xMenuOpt)
CleanOpt= IIF("<"$ CleanOpt, ;
        STUFF(CleanOpt, AT("<",CleanOpt),1,""),CleanOpt)
CleanOpt = IIF("\"$ CleanOpt, ;
        STUFF(CleanOpt, AT("\",CleanOpt),1,""),CleanOpt)
CleanOpt = PROPER(CleanOpt)
RETURN CleanOpt

***********************
PROCEDURE Strip_Blanks
***********************
PARAMETERS xDataItem
DO WHILE " "$xDataItem
        xDataItem= STUFF(xDataItem, AT(" ",xDataItem),1,"")
ENDDO 
RETURN xDataItem
********************************************************************

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Allen
Sent: Thursday, September 30, 2010 8:13 AM


I forgot prmbar and cntbar so never mind unless anyone knows an easier
way
Al

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On
Behalf Of Allen
Sent: 30 September 2010 13:43

Does anyone know of a way of getting names of popups and bars from a
menu or
popup name ?
Al

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/289ea162f5642645b5cf64d624c66a14071a1...@us-ny-mail-002.waitex.net
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to