future at: message.

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

future at: message.

watt p.
Hi,

I am new to Croquet and I look at the code trying to
understand how to run Croquet.  I checked
CroquetHarness and found this in setUpMaster

        space := island future at: #masterSpace.
        portal := island future at:#portal1.
        portal3D := island future at:#portal3D.

I check message future and it returns TFutureMaker
which is a sub subclass of ProtoObject.  I didn't see
at: message selector at ProtoObject level but found it
in Object level.  The question is why the statements
above does not complain the MessageNotUnderstood
error.  Am I missing something basic in class
hierarchy?  Thank you for you help.



Watt P.
Reply | Threaded
Open this post in threaded view
|

Re: future at: message.

Bert Freudenberg
On Dec 3, 2007, at 8:43 , watt p. wrote:

> Hi,
>
> I am new to Croquet and I look at the code trying to
> understand how to run Croquet.  I checked
> CroquetHarness and found this in setUpMaster
>
> space := island future at: #masterSpace.
> portal := island future at:#portal1.
> portal3D := island future at:#portal3D.
>
> I check message future and it returns TFutureMaker
> which is a sub subclass of ProtoObject.  I didn't see
> at: message selector at ProtoObject level but found it
> in Object level.  The question is why the statements
> above does not complain the MessageNotUnderstood
> error.  Am I missing something basic in class
> hierarchy?  Thank you for you help.

TFutureMaker implements #doesNotUnderstand:, which catches all non-
implemented messages, and turns them into a future send. This is a  
"generic proxy", it does forward all messages without specifically  
having to declare each one.

Also, the #future send is usually optimized by the Croquet compiler,  
but that does not change its behavior, just its efficiency.

- Bert -