|
If a rectangle is in the rule head and it is the same color as the
rule figure, then it can match a figure of any type. For example,
the fourth rule in the Vispatch program below will match a drag
event that starts in a figure of any type. The fifth rule will match
a drag event that starts after a chain of two figures of any type. Even though any type of figure will match, the orientation still matters. Therefore the fourth and fifth rules below, for example, will only match if the mouse drag starts from the secondary characteristic point of the figure. This is because the black arrow figure in each rule starts from the lower-right corner of the black rectangle. Try performing mouse drags in the applet below and try to guess which which rule will execute. You can tell which rule executed by the text that it puts at the end of your mouse drag. |
|
Notice mouse drags from the line cause the text "Any 2 rules" to be displayed.
This is a bug that will be fixed. Notice that the equiv line is not treated symmetrically during matching like the line figure is. Therefore a mouse drag from the left end of the equiv figure does not match the fourth rule because that equiv figure's primary characteristic point is on the left. Its secondary characteristic point is on the right. In the example Vispatch program above, the rules figures are black, therefore a black rectangle is used as a wildcard figure. Later in the tutorial, red rules will be introduced. In red rules, red rectangles are used as wildcard figures. |