Hi Sean,
Did you thought about:
-using method wrappers?
-object as methods. An object o put in a method dictionary instead of some
method with selector #s. When #s is looked up, o receives the message
run: selector with: args in: originalReceiver
-proxies (look at Ghost) so you introduce an indirection to perform what ever
action you want before performing the actual code
Noury
On 7 mars 2012, at 21:12, Sean P. DeNigris wrote:
> What's the easiest way to add a statement to an existing method?
>
> In the case I'm thinking about, it's going at the end, so I can cheat and
> just recompile with the string appended, but I'd like to know how to insert
> into an arbitrary place in the AST...
>
> Thanks.
> Sean
>
> --
> View this message in context:
> http://forum.world.st/Adding-a-statement-programmatically-tp4454447p4454447.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
Noury
--
http://twitter.com/#!/NouryBouraqadi
http://www.kroobe.com/profile/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