@@ -17,7 +17,36 @@ Example:
1717dispatch "updateWidget"
1818
1919Example:
20- dispatch "setList" with tNewList
20+ on mouseUp
21+ local tWidth, tHeight
22+
23+ put 200 into tWidth
24+ put 100 into tHeight
25+ dispatch "setSize" with tWidth, tHeight
26+ end mouseUp
27+
28+ on setSize pWidth, pHeight
29+ set the width of graphic "myRectangle" to pWidth
30+ set the height of graphic "myRectangle" to pHeight
31+ end setSize
32+
33+ Example:
34+ # An example of using an array as an argument
35+
36+ on mouseUp
37+ local tDataArray
38+
39+ put "Mickey" into tDataArray["firstName"]
40+ put "Mouse" into tDataArray["lastName"]
41+
42+ dispatch "updateUI" to card "myCard" with "Hello World", tDataArray
43+ end mouseUp
44+
45+ on updateUI pTitle, @pArray
46+ put pTitle into field "Title"
47+ put pArray["firstName"] into field "First Name"
48+ put pArray["lastName"] into field "Last Name"
49+ end updateUI
2150
2251Parameters:
2352message:
@@ -28,6 +57,7 @@ A reference to any LiveCode object.
2857
2958argumentList:
3059A comma separated list of expressions containing the arguments to send.
60+ Arrays are expressions and are valid to send as arguments.
3161
3262It (enum):
3363Set by <dispatch> to indicate how the message was processed.
@@ -38,7 +68,7 @@ Set by <dispatch> to indicate how the message was processed.
3868
3969
4070Description:
41- Use the <dispatch> command to send a mesage to an object, via the
71+ Use the <dispatch> command to send a message to an object, via the
4272message path and find out whether it was handled or not.
4373
4474The <dispatch> command is most useful when using <behavior|behaviors>,
0 commit comments