Persisting 'applications'

Chris Muller chris at funkyobjects.org
Wed Feb 22 19:01:21 UTC 2006


Sorry for the delayed response Bob.

> My connectors come
> back connected unless I
> close the morph. Then the next load from the
> database they are disconnected.
> Still in place but the ends floating. Do you know of
> any way to close the
> morph without this happening? 

Its possible that the Connectors may need some
initialization on rematerialization.  Magma itself
does not require connectors so I have not extended any
of its classes with any pre or post serialization
stuff.

Did you store the Morphs while they were opened and
running in the world?  I try to support both, but you
might have better luck one way or the other.

Sorry I don't have a more definitive answer.  If you
want to get it working here is a suggested approach
(and I can guide you if you wish).

Explore your Radio in the committing image just before
you commit, getting ready to explore its full tree of
state.

In the retrieving image, after opening up the Radio in
the world, explore it.

Now place the two Squeak images side-by-side and work
down through each tree to find what objects in the
receiving image do not match the ones in the
committing image.

These objects will probably need a pre or post
serialization operation.  You can see some examples of
how I set up various pre/post-ops on some of Squeaks
built-in classes (like Color, PasteUpMorph and
Project) by looking at the method
MaObjectSerializer>>#setUpPreAndPostProcessing.

If you get this far let me know, I can probably help
you implement those methods.

> Also if I put in a
> window it restores without
> the window. I think I understand this because the
> window is not the root
> object. If I could get a reference to the window
> somehow and commit that I'm
> sure it would work.

That's a good guess but I'm not sure..  For Morphs
directly in the World, Magma does not serialize their
'owner' (the World).  However, I would think since you
put the RadioMorph into a window (a SystemWindow?)
that its 'owner' would be changed the window, not the
World, so it should have serialized its owner.

Sigh.  I'm sure I could debug this and figure it out
in person; do you have any money?  :)

Otherwise, just email me private if you wish and I'll
do my best to help you from afar.

Regards,
  Chris



More information about the Squeak-dev mailing list