Re: Removing Objects from TSpace

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

Re: Removing Objects from TSpace

Peter Moore-5
Hi Michael,

Try this:

#testingHasChild
    myFrame := harness activeIsland future new: TFrame.
    harness activeSpace future addChild: myFrame.
    p := harness activeSpace future hasChild: myFrame.
    p wait.
    p value ifFalse: [ self error: 'Something is really broken'. ]


-Peter

On Aug 11, 2006, at 2:48 AM, Michael Kleiber wrote:

> Hi,
>
> Sorry for bumping the topic up but I seem to be at loss here ...
>
> I tried as Andreas suggested with a very simple test (which fails):
>
> #testingHasChild
>    myFrame := TFrame new.
>    harness activeSpace future addChild: myFrame.
>    p := harness activeSpace future hasChild: myFrame.
>    p wait.
>    p value ifFalse: [ self error: 'Something is really broken'. ]
>
> This is called in #keyUp: of a subclass of SimpleDemoMaster (just  
> to make sure nothing out of the ordinary is causing the problem).  
> Other than this additional method everything else is just inherited.
>
> Can anybody else replicate the problem?
>
> Bye,
> Mike
>
> PS: I am using the Linux Squeak/Croquet version in case that matters.
>


Reply | Threaded
Open this post in threaded view
|

Re: Removing Objects from TSpace

Andreas.Raab
Peter Moore wrote:
>    myFrame := harness activeIsland future new: TFrame.
vs.
>    myFrame := TFrame new.

Yes indeed. Good catch. You need to create the frame on the island
you're trying to test it on. Otherwise the frame will be *copied* into
the island every time you pass it in.

Cheers,
   - Andreas