Re:newcomer question about error when rightclicking cube

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

Re:newcomer question about error when rightclicking cube

Jeroen van Hilst

> From: "Howard Stearns" <[hidden email]>
> It's not clear where your code is executing, and that itself suggests
> that you might be confused about the difference between creating an
> object inside the island and off.
>


I was executing it from a WorkSpace. And you are very right I didn't notice
the difference between creating an
object inside the island and off.

"code to assign self to be the Island"
> self activeSpace future addChild: (self activeIsland future new: TCube)


I guess what it comes down to is I should let the Island create the TCube
itself by sending it a future message.

I originally wanted to play with TVehicle and friends, but i couldn''t get
anything to work, so i scaled down to a cube.
But now i understand i missed a layer ...

Thanks very much for clearing this up.

    - jeroen


----- Original Message -----
From: "Howard Stearns" <[hidden email]>
To: "Jeroen van Hilst" <[hidden email]>
Cc: <[hidden email]>
Sent: Wednesday, January 03, 2007 4:30 PM
Subject: Re: [croquet-user] newcomer question about error when rightclicking
cube


> It's not clear where your code is executing, and that itself suggests
> that you might be confused about the difference between creating an
> object inside the island and off.
>
> I think we need an example in the programming guide of creating an
> object from outside the island.  There are some examples buried within
> the different implementations of #setup, but they I think they tend to
> obscure rather than clarify.
>
> A wide ranging thread on this is at
> https://lists.wisc.edu/read/messages?id=1545587
>
> Note that executing something in a workspace is outside the island. An
> example of adding a cube from outside the island might be to get self to
> be the harness. (How you do this depends on what Croquet Participant
> morph you're using. For example, using Simple Demo, you can use the
> Morphic halo tools menu to Explore Morph, and then click on 'harness'.)
>   Then you would do
>    self activeSpace future addChild: (self activeIsland future new: TCube)
> Alas, there's another layer of issues for getting right mouse to do
> something. But first things first.
>
>
>
> Jeroen van Hilst wrote:
> > When I open a Croquest space and add a cube like this:
> >
> > s := TSpace allInstances at: 1.
> > s addChild: TCube new.
> >
> > I see a cube in the center of the space.
> > When I rightclick this cube i get a error:
> >
> > "The object has no name."
> >
> > What do do wrong or forget ?
> >
> > I have tried setting a name with objectName: but it doesnt help.
> >
> >     -jeroen
> >
> >
> >
> >
>
> --
> Howard Stearns
> University of Wisconsin - Madison
> Division of Information Technology
> mailto:[hidden email]
> jabber:[hidden email]
> voice:+1-608-262-3724