Re:Removing Objects from TSpace

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re:Removing Objects from TSpace

Michael Kleiber
I tried your suggestion but it did not help. I now get the error message because the space does not have the child. In the following method myFrame is an instance variable I keep. Before adding a new object I would like to delete the old one (thats why I keep the instance var), yet it does not work ...

        | gTransform p |

        myFrame ifNotNil: [
                p := harness activeSpace future hasChild: myFrame.
                p wait.
                p value ifFalse: [ self error: 'Something is horribly broken'. ]

        " Figure out position. "
        gTransform := harness avatar globalTransform.

        myFrame := TFrame new.
        myFrame transformBy: gTransform.

        harness activeSpace future addChild: myFrame.