EventRecorderMorph
Ned Konz
ned at squeakland.org
Mon Jan 10 03:46:55 UTC 2005
On Sunday 09 January 2005 6:57 pm, Ralph Johnson wrote:
> I' musing EventRecorderMorph in 3.7
>
> When I replay a recording that enters a project and then returns,
> the recording bombs as soon as it enters the project. It looks
> like the code is trying to handle this case, but I can't see what
> is going wrong. Does anybody know whether this is hopelessly
> broken or whether a little change might fix it?
Hi Ralph,
The EventRecorderMorph receives its events from the Hand, and the Hand is
per-World (at least in the usual case where the new World is not being viewed
inside the old World). Simply put, the ERM was never intended to handle cases
where its world became inactive during recording.
What you might be able to do is to enter the new project using one of the
(hidden) options in the menu in the project view morph. Hold down the mouse
button with the hand over the project view morph until a menu comes up, then
choose "ENTER ACTIVE". Then click on the dark blue square in the upper right
hand corner of the frame. This will make the new World almost as big as the
old one. However, the ERM should still be getting events from the (shared)
hand.
To make this work on entering a new project in the usual way (i.e. completely)
the ERM would have to migrate to the new World and hook itself up to that
World's hand, and restart recording.
However, I don't think that morphs get notified when their world is about to
become inactive, so you'd have to add an event notification from the project,
probably in Project>>finalExitActions. Then the old project or World could
add the ERM to the new World and make it ready to keep recording (there
should be a HandMorph there already).
Or you could make it one of the jobs of the new World to grab any active ERMs
from the old world (which can be found from the Project) and relocate them.
--
Ned Konz
http://bike-nomad.com/squeak/
More information about the Squeak-dev
mailing list
|