[Pharo-dev] Deprecator

Camille Teruel camille.teruel at gmail.com
Thu Aug 7 10:30:28 EDT 2014

On 7 août 2014, at 16:15, Sean P. DeNigris <sean at clipperadams.com> wrote:

> camille teruel wrote
>> I hope for comments
> How do you activate it? I loaded into #40160, and copied your snippets from
> the post, but when I did "MyClass new senderMethod", no debugger came up...

Hello Sean,

Sorry, I did a few modifications that I didn't reported here.
First, the pragma changed. Now it's <deprecatedIn: #versionSymbol replaceWith: 'rewriteString'>.
Second, the syntax changed: the '`@' that were needed before (for the RBParseTreeRewriter) are gone. 
So each available metavariable are written directly: receiver, arg1, arg2, ... arg15.
You need the latest version (8).

So the example is now:

C>>deprecatedMethodArg1: o1 arg2: o2
	<deprecatedIn: #Pharo42 replaceWith: 'receiver replacementMethodArg1: arg2 arg2: arg1'>
 	^ #deprecated

C>>replacementMethodArg1: o1 arg2: o2
	^ #replacement

	^ self deprecatedMethodArg1: 1 + 1 arg2: 2 + 2. 

Then evaluating C new senderMethod should bring the following pre-debug window.


> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Deprecator-tp4769843p4772312.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20140807/802607d6/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deprecation warning.png
Type: image/png
Size: 25729 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20140807/802607d6/attachment.png>

More information about the Pharo-dev mailing list