Hi,
the processStimulus method of my custom behavior takes the form often
quoted in text books/tutorials etc, i.e.:
public void processStimulus(Enumeration criteria) {
WakeupCriterion wakeup;
AWTEvent[] evt = null;
while(criteria.hasMoreElements()) {
wakeup = (WakeupCriterion) criteria.nextElement();
if (wakeup instanceof WakeupOnAWTEvent) {
evt = ((WakeupOnAWTEvent) wakeup).getAWTEvent();
....
do stuff
}
I notice that if AWT events have occurred while my behavior has been
disabled, they still appear in the array of AWTEvents returned in the
WakeupCriterion above.
This does not make any sense to me. If my behavior is disabled, I don't
care about these events. And yet, they're stored up. As soon as another
event is fired once the behavior is enabled, I get the whole stored
collection of them - those fired before aswell as those fired after the
behavior became enabled.
I get around this by just taking the last one off the list (I notice
some of Sun's own behaviors in the com.sun.java3d package take just the
first event off the array, presumable for the same reason).
Is this is a bug? Will it be fixed?
Has anyone a better workaround?
Has anyone else experienced anything different? the same?
Thanks,
-Paul
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".