What happened to the conversion method prototypes?

Jesse Welton jwelton at pacific.mps.ohio-state.edu
Wed May 2 12:06:23 UTC 2001


Ned Konz wrote:
> 
> On Tuesday 01 May 2001 11:15, Jesse Welton wrote:
> 
> > The old conversion methods have been completely supplanted by
> > #convertToCurrentVersion:refStream:.  Comments explaining the change
> > are available in SmartRefStream>>aComment.  Unfortunately, there are
> > still a few references the the old-style conversion mechanism, like
> > those hanging around in the ChangeSorter.
> 
> OK, I wrote it. However, it doesn't seem to be used for changing existing 
> instances in an image (I'd like for a file-in of my change set to edit 
> existing instances). I've removed two instance variables and added one; the 
> value of the new one depends on the two removed ones.
> 
> How do people do this? I thought that maybe I could collect all the 
> appropriate instances (with copies of their soon-to-be-removed instVars) in 
> the preamble along with their required data, then fix them in the postscript.
> Does this make sense?

Yes, this makes sense.  When I was doing layout changes I just did the
conversion in the postscript, but I wasn't removing any instance
variables with information I needed.  Besides collecting them and
caching their data in the preamble, you might consider making the
change in two steps: First, add the new instance variable and fill it
from the soon-to-be-deleted instance variables.  Second, remove the
old instance variables.  (Presumably, this is how things actually
progressed as you were making the changes in your image.)  This could
either be in two change sets, or (if I understand things correctly,
though I've never tried it) in one hand-modified change set.

If you can get the preamble-based version to work, that may be the
more easily manageable option.  A two-step change would be safer if
there's any chance of instances being created during the file-in.

-Jesse





More information about the Squeak-dev mailing list