what gives with this function?

Jim Lambert jiml at netrin.com
Wed Jun 27 16:54:51 EDT 2007


Hi All,

Here's a function that goes either in the card script or the stack 
script.

function whatGives what
   return what
end whatGives

Make a field "myFld"
Make a button having this script:

on mouseUp
   put whatGives(random(999)) into fld "myFld"
end mouseUp

Click the button and random numbers appear in the field as expected.
But call the function from the message box:

put whatGives(random(999)) into fld "myFld"

and lo! nothing gets put in the field however the value returned from 
whatGives appears in the message box.
Why isn't the returned value placed in the field?
What gives?

Thanks In Advance,
Jim Lambert

P.S. OSX 10.3.9   Rev Studio Build 471 vers 2.8.1


More information about the use-livecode mailing list