My handler had this structure:
Code: Select all
on myHandler @pString, pOtherParameter
...
end myHandler
Code: Select all
myHandler myFunction(myInstanceVariable), myOtherParameter
Code: Select all
get myFunction(myInstanceVariable)
myHandler it, myOtherParameter
Code: Select all
on myHandler pString, pOtherParameter
...
end myHandler
I might note that I come to LiveCode from programming languages that implement call by value by pushing a copy of the actual parameter on the call stack, and implement call by reference by pushing the address of the original actual parameter on the call stack. Does LiveCode behave differently?
Or is it the case that the function that returns a string extracted from an array sends back a value that is somehow different from other LiveCode values? I ask this because the original problem can also be solved by changing my function structure from this:
Code: Select all
function myFunction pInstanceVariable
...
return pInstanceVariable[tKey]
end myFunction
Code: Select all
function myFunction pInstanceVariable
...
get pInstanceVariable[tKey]
return it
end myFunction