Hi Daniel,


The tree you have drawn is essentially:

        s0 || s1 || s2 || (s0 && s1)

The last term, s0 && s1, is redundant.

It is possible that some runtime error occurs because
the reference s0 is used more than once which we
didn't make a copy internally (possible bug).

To workaround it, please new another copy of s0/s1
and pass it to wakeupOn().

Thanks.

- Kelvin
------------------
Java 3D Team
Sun Microsystems Inc.

>X-Unix-From: [EMAIL PROTECTED]  Thu Jun 14 20:40:50 2001
>Delivered-To: [EMAIL PROTECTED]
>MIME-Version: 1.0
>Date: Fri, 15 Jun 2001 11:40:34 +0800
>From: Daniel Balaguer Yagan <[EMAIL PROTECTED]>
>Subject: [JAVA3D]
>To: [EMAIL PROTECTED]
>
>hi there to all,
>   I'm implementing a simple behavior with the following initialize() code:
>
>   WakeupCriterion[] single = new WakeupCriterion[4];
>   single[0] = new WakeupOnAWTEvent(MouseEvent.MOUSE_CLICKED);
>   single[1] = new WakeupOnAWTEvent(MouseEvent.MOUSE_MOVED);
>   single[2]= new WakeupOnAWTEvent(KeyEvent.KEY_PRESSED);
>
>   WakeupCriterion[] mix = new WakeupCriterion[2];
>   mix[0] = single[0];
>   mix[1] = single[2];
>
>   single[3] = new WakeupAnd(mix); // something wrong here
>
>   wakeupOn(new WakeupOr(single));
>
>   Just in the code, I'm implementing a behavior that wakes up on either of
>the 4 conditions: mouseClicked or mouseMoved or keyPressed or (mouseClicked
>and keyPressed). I'm getting some runtime errors..
>what's the right thing to do?
>
>thanks,
>daniel
>
>===========================================================================
>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".

===========================================================================
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".

Reply via email to