[Pharo-users] Updating a project and NIL class variables

Sven Van Caekenberghe sven at stfx.eu
Wed Jan 20 07:53:25 EST 2016


They remain nil.

That is why #initialize on the class side is needed.

You can call that explicitly in a post load script, or rely on the class loading mechanism that normally calls #initialize automatically when loading a class. The warning is: this only happens when the *source* code of the #initialize methods changes. So sometimes, you will have to touch that method to force it.

I hope that makes sense.

See MCMethodDefinition>>#postloadOver:

> On 20 Jan 2016, at 13:41, Dimitris Chloupis <kilon.alios at gmail.com> wrote:
> 
> So my question is this , I have a class with nil variables that are lazy initialised only when needed the first time and of course they keep their values from there on. 
> 
> Lets say I get the latest update from github via metacello over an older update that I already have inside the image , do those variables revert back to nil values ? or do they keep their values as they are ? 





More information about the Pharo-users mailing list