I have been trying to pass a variable which contains an array with no
success.
One button has a handler like this
on mouseUp
put empty into fld "thekeys"
put fld "thelist" into xx -- a 100-line field, 2 items per line
repeat with i = 1 to the number of lines of xx
repeat with j = 1 to the number of items of line i of xx
put item j of line i of xx into tl[i,j]
end repeat
end repeat
put keys(tl) into fld "thekeys"
call "getvar" && tl of fld "getit"
end mouseUp
The keys() function correctly identifies the parts of the array that are
filled.
The call function in the above handler reaches this one (I put the beep in
to be sure).
on getvar x
beep
answer keys(x)
end getvar
But x is read as empty. So, why can't I pass associative arrays? I notice I
can't pass fields either.
One of the great strengths of Hypercard is its ability to pass fields and
complex variables. Of course, it doesn't have the ability to do "call"
statements or even create arrays. Ah, for the best of both ...
Raymond