newcomer question about error when rightclicking cube

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

newcomer question about error when rightclicking cube

Jeroen van Hilst
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




Reply | Threaded
Open this post in threaded view
|

Re: newcomer question about error when rightclicking cube

Howard Stearns
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