[BUG] loading new version of RB deletes important methods

Julian Fitzell julian at beta4.com
Thu Sep 18 23:24:46 UTC 2003


Avi Bryant wrote:
> On Thu, 18 Sep 2003, Ned Konz wrote:
> 
> 
>>Would it work to have an otherwise empty class with an initialize
>>method that just does some work and deletes itself?
> 
> 
> I dunno about the "deletes itself" bit...
> In fact, I'm pretty sure you don't want that, because then the next time
> you load a version, that class will get re-added and its #initialize
> method re-called.
> 
> What you want is a series of UpdateToVersion23,
> UpdateToVersion24, UpdateToVersion25 classes, each with an initialize
> method that performs the appropiate tweaks.  Only the ones that are being
> added will have #initialize sent, you you should get the right sequence of
> updates no matter what you started with.
> 
> You need to ensure that they get loaded in the right order - one way might

Which would be what when you've merged in a whole bunch of versions? 
Not sure the standard ordering we use for other things would always be 
right for that.

> be to make them form a linear class hierachy, and the dependency mechanism
> should take care of it for you.
> 
> You also ideally want some flag that stops any of them from running in the
> case that it's a first-time load.
> 
> Ideally there would just be a first-class notion of "update script" in
> Monticello, though.  Any ideas as to how this should work?

Sigh... no... but we need it.

Julian



More information about the Squeak-dev mailing list