Hi Raffi:

If this is OT, I apologize - setEnable does work for all MouseBehaviors.
This is probably because MouseBehavior provides sensibly overrides
setEnable. I recall enabling/disabling mousebehaviors in the updateScene
of "PickHighlightBehavior", and I do recall that things worked as
expected.

Regards

Raj Vaidya


>On Fri, 14 Dec 2001 11:06:30 -0500, Kasparian, Raffi J. <[EMAIL PROTECTED]> 
>wrote:

>Nope, using a Switch doesn't work.
>
>-----Original Message-----
>From: Kasparian, Raffi J. [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 14, 2001 9:45 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [JAVA3D] Behavior.setEnable(True)
>
>
>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.
>
>
>-----Original Message-----
>From: Adrian Meekings [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, November 11, 2001 10:28 PM
>To: [EMAIL PROTECTED]
>Subject: [JAVA3D] Behavior.setEnable(True)
>
>
>Hello again
>as a "work-around" to my last question on this...
>
>What would be the main reasons for a behavior NOT to be re-enabled using
>setEnable(True);
>
>Kind Regards
>Adrian
>
> ==========================================================================
>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".
>
> ==========================================================================
>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