Re: [Pharo-dev] References to Obsolete classes

2013-10-04 Thread Sabine Knöfel
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 :

> 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
> 
> 
> 
> 



Re: [Pharo-dev] References to Obsolete classes

2013-10-04 Thread Sebastian Tleye
I agree,

If you want to reference an obsolete class after removing the class A, then
the source code of the method should also change, and say "AnObsoleteA"
instead of "A"
if the source code says "A" then i do not like to have a reference to
"AnObsoleteA"




2013/10/4 Sabine Knöfel 

> 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 :
>
> > 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
> >
> >
> >
> >
>
>