[Pharo-dev] References to Obsolete classes

Sabine Knöfel sabine.knoefel at gmail.com
Fri Oct 4 06:25:55 EDT 2013


Hi,

I run into the same problem last week and endend up in reloading my code in a new image. I prefer your suggestion.

Sabine


Von meinem iPad gesendet

Am 04.10.2013 um 12:04 schrieb Noury Bouraqadi <bouraqadi at gmail.com>:

> Hi,
> 
> Consider the following scenario:
> 1- create class A
> 2- create class B with a method m that references class A
> 3- delete class A . As a result B>>#m holds a reference to ObsoleteA
> 4- create a new class A. 
> 
> B>>#m continues to hold a reference to ObsoleteA. This is even more disturbing, since the source of B>>#m displays A.
> 
> Is this behavior desired? If yes, in which situations. because I'd rather prefer to have B>>#m updated. This can be done, by moving the association of a removed class (or global in the general case) from the system dictionary to the Undeclared.
> 
> Side note: just noticed that Undeclared is a dictionary. I was expecting it to be a WeakSet.
> 
> Noury
> Ecole des Mines de Douai
> http://car.mines-douai.fr/noury
> --
> 
> 
> 
> 
> Afin de contribuer au respect de l'environnement,
> merci de n'imprimer ce courriel qu'en cas de necessite
> 
> Please consider the environment before you print
> 
> 
> 
> 




More information about the Pharo-dev mailing list