Hi All,
I'm new to FIvewin and I hope somebody could help me analyze what's going on with my code. I am trying to build menu from multidimensional array:
GLOBAL aAccessMenu := { { '&Login Ctrl L', 'Log out Ctrl X' },;
{ 'System Log in', 'System Log out' },;
{ FALSE, FALSE },; // checked?
{ TRUE, FALSE },; // status
{ {|| uCheckUserPass() } , nil },; // baction
{ nil, nil },; // resname
{ ACC_CONTROL, ACC_CONTROL },;
{ 'G', 'X' },;
{ 'Login', 'Logout' } }
and I use this code to build the menu:
MENU oMenu
oMenu:l2007 := TRUE
MENUITEM aItems[1] PROMPT '&Access ' MESSAGE 'System Access'
aItems[1]:Cargo := 'Access'
MENU oAccPopup
FOR i := 1 TO Len( aAccessMenu[1] )
MENUITEM aAccessItems[i] PROMPT aAccessMenu[1][i] MESSAGE aAccessMenu[2][i] ;
ACTION aAccessMenu[5][i];
RESOURCE aAccessMenu[6][i];
ACCELERATOR aAccessMenu[7][i], Asc(aAccessMenu[8][i])
Msginfo( cvaltochar(aAccessItems[i]:bAction) )
aAccessItems[1]:Cargo := aAccessMenu[9][i]
END
.....
.....
However, I noticed that the value of aAccessItems[1]:bAction is just simply "{||...} and not the value from the array which is {|| uCheckUserPass() }. How may i be able to call the function from multidimensional array and store it as valid function call in Tmenuitem?
Thanks.