@Klaus
So no mention of using "dispatch" with a function!
That is what I meant by:
even though, to me, the inclusion of the word "function" seems odd in the context of what the dictionary says.
I think we agree.
@ aetaylorBUSBnWt (and Klaus)
On a new card, with two buttons, "B1" and B2", in the script of "B1":
Code: Select all
on mouseUp
dispatch function "xx" to btn "b2"
answer the result
end mouseUp
And in the script of btn "B2":
Code: Select all
function xx
return random(99)
end xx
Works fine, you get random numbers every time. But if you do NOT have the word "function" in "B1":
Code: Select all
on mouseUp
dispatch "xx" to btn "b2"
answer the result
end mouseUp
then the result is always empty. No error thrown, just no go.
I place a breakpoint in "B2". It catches with the word "function" in B1". But without that word, B2 never fires at all.
Craig