Encapsulate the function removing the 2TG within:
try
{
   ... your code ...
}
catch (Throwable t)
{
   t.printStackTrace();
}
 
You will see at the console the exception raised, so you'll know what's exactly the problem, i.e. a message like TransformGroups cannot be removed from live objects. Furthermore, your program won't stop responding.
 
Cheers,
 
Florin
 
-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]On Behalf Of Alp Yilancioglu
Sent: Freitag, 4. Juni 2004 02:08
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Robot Arm simulation

Hi,

 

  Thank you for helping me in this..

 

  But I still got a problem

 

 

In the code

 

Lets say I have 1TG and  2TG named  TransformGroups

          that have setCapability-Allow-transformGroup-read/write properties

 

and  1TG->has the shape added sphere

        2TG-> has cyl�nder

and 1TG.addChild(2TG);

is working well..

 

in the code after adding 2TG to 1TG . I can remove them too w�th removeCh�ld

 

       1TG->has sphere

        2TG-> has cyl�nder

        1TG.addChild(2TG);

        1TG.removeCh�ld(2TG);

 

th�s works well too..

 

but dur�ng Runtime.. when � done th�s -1TG.removeCh�ld(2TG);-

      w�th a funct�on wh�ch �s performed by press�ng a button from a panel

                     the program stops .. no render�ng or may be �t crashes ???

 

 

 

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