Re: camera in CroquetEvent?
Posted by Andreas.Raab on Aug 12, 2006; 12:00am
URL: https://forum.world.st/Re-camera-in-CroquetEvent-tp129390.html
Hi Howard -
Sorry for not getting back earlier but something struck me about your
message as being really, really wrong and I finally realized what my
problem with it is:
Howard Stearns wrote:
> Andreas, you're right about the TFarRef happening outside a future
> message. It happens in:
>
> TChattyAvatarReplica>>prointerLeave: evt
> super pointerLeave: evt.
> self root signal: #hideID with: evt with: nickname.
No, this can't be it. If, at this point, the event contains a TFarRef
for the camera we're already hosed and need to look at where that
reference came from. The reason being that pointerLeave: should have
been invoked as a future message, and future messages *never* create
FarRefs for their arguments (all arguments in future messages are copied
verbatim). So if there's a FarRef in the event at that point things
already went wrong. I strongly suspect that the problem is happening
elsewhere.
> Or we can change it to pass a copy of the event, as is done by:
>
> TAvatarUserMenu>>doBlueButtonUp: event
> | eventCopy |
> eventCopy := event copy.
> eventCopy selection: event selection copy.
> eventCopy selection target future signal: #blueButtonUp with:
> eventCopy.
Huh? This works? How very strange. You're not changing the camera in the
above so the copy should refer to the camera just like the old event and
should cause precisely the same problems.
> But I'm not clear on the philosophy by which to decide what the right
> path is. (I guess it would be up to Tony.) Naively, it seems weird to
> have events be #passByClone:, only to have to have to make copies
> whenever we want to actually pass one.
Yeah, that's certainly not the right way to deal with it. Well, first
let's try to nail the issue with the camera in the event - if there's
really a FarRef in there then something is really, really wrong and we
need to find out where that reference is coming from. If there isn't a
FarRef in there it's back to square one, e.g., find the sync message
that causes the camera to be "injected" into the replicated space by way
of some far ref.
Cheers,
- Andreas