Simple Function use
Posted: Sat Jun 11, 2016 6:41 pm
Trying to learnLive code and cannot do even the most simple of programming features ...
I have a single stack and want return a varA from a function disp_to_acceleration and put it into a text field i call AccelValue
my goal is to create a collection of functions . click a button and have it populate different text boxes.
Stuck on the first one.
on mouseUp
put field "FreqValue" into varF -- this works
put field "DispValue" into varD -- this works
let varA= (disp_to_acceleration(varF,varD), stack "Dynamic Conversion") -- this fails
put varA into field "AccelValue"
end mouseUp
with error
button "Button": execution error at line 6 (Chunk: can't find stack), char 1
There are two tabs and one of them says stack "Dynamic Conversion", which is were my function lives.
function disp_to_acceleration(varF,varD)
return varF*varD
end disp_to_acceleration
any help is appreciated. This is the simplist of things to do , but, totally escapes me in LiveCode.
I have a single stack and want return a varA from a function disp_to_acceleration and put it into a text field i call AccelValue
my goal is to create a collection of functions . click a button and have it populate different text boxes.
Stuck on the first one.
on mouseUp
put field "FreqValue" into varF -- this works
put field "DispValue" into varD -- this works
let varA= (disp_to_acceleration(varF,varD), stack "Dynamic Conversion") -- this fails
put varA into field "AccelValue"
end mouseUp
with error
button "Button": execution error at line 6 (Chunk: can't find stack), char 1
There are two tabs and one of them says stack "Dynamic Conversion", which is were my function lives.
function disp_to_acceleration(varF,varD)
return varF*varD
end disp_to_acceleration
any help is appreciated. This is the simplist of things to do , but, totally escapes me in LiveCode.