Why I love deprecated

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Why I love deprecated

stepharo
I wanted to rename some of the iconNamed: into iconName:

on menu and settings.....

So cooooooool


iconNamed: aSymbol
     "instead of forcing clients to refer to an icon builder such
Smalltalk ui icons
     this message encapsulates it inside the builder itself. When
removing uses of Smalltalk ui icons it avoid to force to subclass class
with menu to inherit from Model."
     self flag: #toRemove.
     self
         deprecated: 'Please use #iconName:  instead'
         transformWith: '`@receiver iconNamed: `@statements1'
                         -> '`@receiver iconName: `@statements1' .

     ^ self iconName: aSymbol


and bring a menu and the code got transformed.


Stef