>Date: Mon, 15 Apr 2002 15:55:02 +0200 >From: "Schäfer, Peter" <[EMAIL PROTECTED]> >Subject: [JAVA3D] Can't Call stopView() from Behavior >To: [EMAIL PROTECTED] >MIME-version: 1.0 >Delivered-to: [EMAIL PROTECTED] > >Hello there, > >I would like to call View.stopView() after a Behavior (an animation) has >finished. >However, I get an > "IllegalStateException: can't call stopView from behavior method" >(or something like this). > >Any idea how to work around this ? > >The javadoc for stopView() says: > "This is a heavy-weight method ..; it is not intended to be used for >flow control." >But which method is actually intended for flow control ??? >
As mentions in the specification, you can't invoke this method from a behavior callback (i.e. inside processStimulus) since stopView() is intent to return back to user control only after all the rendering /behavior stop. i.e. it can't be done in the middle of behavior thread running. A workaround is to use an AWT thread or user thread to invoke this method. Thanks. - Kelvin -------------- Java 3D Team Sun Microsystems Inc. ==========================================================================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".