Attached is a program that demonstrates what I think is a bug with
Behavior.processStimulus( Enumeration criteria ). When the program disables
the behavior and then enables it, "criteria" includes events that occurred
when the behavior was disabled. Surely this is not the intended behavior.
To use the program, click on the Canvas3D. System.out prints the number of
MouseEvents "criteria" contains. (Should be "1"). Now click the "Toggle"
button. This will toggle the behaviors enabled state. Click a few times on
the screen. System.out prints nothing (because the behavior is disabled).
Now click the "Toggle" button again and click once on the screen. System.out
prints the total number of clicks that occurred when the behavior was
disabled plus the most recent click.
Has anyone else experienced this problem. Does anyone have a good
work-around?
Thanks,
Raffi
<<BugTest.java>>
BugTest.java