Login  Register

Removing Objects from TSpace

Posted by Michael Kleiber on Aug 04, 2006; 2:46pm
URL: https://forum.world.st/Removing-Objects-from-TSpace-tp129387.html

Hello All,

I recently began programming with the 1.0 Croquet and quickly stumbled
upon a problem. How do I remove Objects (TFrames) after I added them
dynamically to my root space?

Following the examples (as in Import Object) I add new objects by issuing:
  replica := hand world ownerMorph harness avatar replica.
  root := replica future root.
  root future addChild: myTFrame.

When I keep myTFrame as an instance Variable and try to check later if
the space already has this particular object I do not get reasonable
answers - trying to #removeChild: does nothing:

  root future hasChild: myTFrame
returns a TFarRef with value false

  root future removeChild: myTFrame
does nothing

So how would I dynamically add and remove objects from a space?

Michael