Hi,

>Hi Adrian (and Sun Programmers),
>
>I just discovered (for myself) that Behavior.setEnable( true ) doesn't work.
>Doing a search of this groups archives turned up your (Adrian's) posts. I'm
>amazed that no one answered them -- at least not on the list. setEnable()
>only works if you want to disable a behavior. After that your behavior is
>junk until you can cause it to wakeup again. Since you can only call
>wakeupOn() from processStimulus and initialize and we are forbidden as
>programmers to call those two methods, the only thing I have discovered that
>works is to trigger the initialize method by detaching the behavior from the
>scenegraph and then reattaching it. I suspect using a Switch might be more
>efficient but I haven't tried it yet.
>
>Please Sun Programmers, if there is a reason setEnable( true ) is so
>crippled would you please explain? Does it have any use except for changing
>a flag in Behavior? The name "setEnable" and the javadoc "Enables or
>disables this Behavior" sets up the reasonable expectation that the Behavior
>will start functioning again when you pass it "true". If you have no
>intention of doing this maybe it should be renamed to "waste_a_line_of_code(
>boolean state )".
>
>Sorry, I don't mean to be too snide, but I dimly recall this being an issue
>years ago and I am disappointed that Sun has not addressed it. Not even by
>providing less misleading documentation.
>

Which version of Java3D are you using ?

There is a couple of bugs related to
setEnable fail in previous release
(e.g. 4465262 - MouseBehavior postID not work after
                behavior disable and enable again)
but they are fixed in v1.3 beta1.

There is an example bundle which use Behavior
setEnable() to show it works
programs/examples/SplineAnim

If you have a test program please send it to us
for investigation.

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

Reply via email to