hello

I have suddenly discovered a problem with my mousepickbehavior class in the 
processStimulus method
I display a graph in 3d and you can double click on the nodes and edges to select one.
When I start my application and then click 3x on a node instead of 2x (so a triple 
click :)) I get the following exception :

Exception occurred during Behavior execution:

java.util.NoSuchElementException: No more criterion

        at 
javax.media.j3d.WakeupCriteriaEnumerator.nextElement(WakeupCriteriaEnumerator.java:132)

        at 
app.graph.view3d.behaviors.MousePickBehavior.processStimulus(MousePickBehavior.java:74)

        at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:167)

        at javax.media.j3d.J3dThread.run(J3dThread.java:256)

Note that I only get this exception when        I haven't selected a node before with 
a doubleclick. So once the application is running after a correct first selection I 
may tripleclick all I want , it won't throw an exception. I see
that the processStimulus method actually has a WakeUpCriteriaEnumerator argument 
instead of a Enumeration object as argument as stated in the documentation. Why is 
this? Is there extra functionality in the
WakeUpCriteriaEnumerator class that may be useful in my case? Apparently the 
WakeUpCriteriaEnumerator class ins't public anyway.

Is there anyone who has encountered this problem also?

btw : here is my code in the processStimulus method :

    public void processStimulus(Enumeration aCriteria)
    {
        WakeupOnAWTEvent crit = (WakeupOnAWTEvent)aCriteria.nextElement();
        java.awt.AWTEvent[] events = crit.getAWTEvent();
        MouseEvent event = (MouseEvent)events[0];
        //process event
        .......

thanks,
mattie

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