Michael Rueger a écrit :
> Hi all,
>
> while working on the sensor fix I ran across the problem that there is 
> no initialization code for current preference settings, a typical side 
> effect of working with an image.
>
> Problem is, that references, in my case to the class InputSensor, can't 
> be found by the usual cross reference methods.
>
> IMHO we should come up with "something" so we can re-generate the 
> current preferences from code if needed. That initialization code would 
> also provide the necessary cross references.
>
> Not sure how that plays with the pragma preference stuff...
>   
If I well understand, the problem is as follow:
You have a preference which value is a class (InputSensor).
The problem is that the class InputSensor can be removed or changed, 
letting your preference value
point to AnObsoleteInputSensor. You would like to be warned that 
InputSensor is used as a preference value
when you're about to remove that class.
Do I understand well ?

For such a situation, the new setting package can provide the 
initialization code you would like with the help of a SettingStyle.
A SettingStyle only responsibility is to provide a load method which, 
when evaluated, re-generates
settings.
We could have a "current" SettingStyle always up-to-date and which would 
be automatically changed (generating of the load method)
every time a setting value is changed. Of course, then, a simple setting 
change would be time consuming
but I guess this is not very important because settings are set rarely.

what do you think ?

alain

> Michael
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>   


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to