array parameter
Posted: Fri Mar 25, 2011 7:42 am
Hi all,
I am not sure if this is related the HMG, but please share your thoughts.
I call a procedure & pass an array in the following manner:
SetButtonStatus({ ,;
{'Add',.t.} ,;
{'Edit',.t.} ,;
{'Save',.t.} ,;
{'Cancel',.t.} ,;
{'Delete',.t.} ,;
{'Close',.t.} })
Static Procedure SetButtonStatus(aButtons)
local nI ,;
cForm ,;
cButton
for nI = 1 to Len(aButtons)
cForm := 'Main'
cButton := 'Button_'+aButtons[nI,1]
SetProperty(cForm, cButton, "ENABLED", aButtons[nI,2])
next
Return
I get the "Error BASE/1068 Argument error: array access" on this line:
cButton := 'Button_'+aButtons[nI,1]
Thanks.
I am not sure if this is related the HMG, but please share your thoughts.
I call a procedure & pass an array in the following manner:
SetButtonStatus({ ,;
{'Add',.t.} ,;
{'Edit',.t.} ,;
{'Save',.t.} ,;
{'Cancel',.t.} ,;
{'Delete',.t.} ,;
{'Close',.t.} })
Static Procedure SetButtonStatus(aButtons)
local nI ,;
cForm ,;
cButton
for nI = 1 to Len(aButtons)
cForm := 'Main'
cButton := 'Button_'+aButtons[nI,1]
SetProperty(cForm, cButton, "ENABLED", aButtons[nI,2])
next
Return
I get the "Error BASE/1068 Argument error: array access" on this line:
cButton := 'Button_'+aButtons[nI,1]
Thanks.