This Warning is signalled by methods which are deprecated.
The use of Object>>#deprecatedExplanation: aString and
Object>>#deprecated: aBlock explanation: aString is recommended.
Idiom: Imagine I want to deprecate the message #foo.
foo
^ 'foo'
I can replace it with:
foo
self deprecatedExplanation: 'The method #foo was not good. Use
Bar>>newFoo instead.'
^ 'foo'
....
but
deprecatedExplanation: aString
"This method is OBSOLETE. Use #deprecated: instead."
self deprecated: 'Use Object>>deprecated: instead of
deprecatedExplanation:.'.
Preferences showDeprecationWarnings ifTrue:
[Deprecation signal: ('{1} has been deprecated. {2}' translated
format: {thisContext sender printString. aString})]
and
deprecated: aBlock explanation: aString
"This method is OBSOLETE. Use #deprecated:block: instead."
self deprecated: 'Use Object>>deprecated:block: instead of
deprecated:explanation:.'.
Preferences showDeprecationWarnings ifTrue:
[Deprecation
signal: ('{1} has been deprecated. {2}' translated format:
{thisContext sender printString. aString})].
^ aBlock value.
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project