getting selector and args in a generic way

Noury Bouraqadi bouraqadi at ensm-douai.fr
Tue Aug 23 14:04:08 UTC 2005


Hi Houssam,

Here attached an example that shows how to retrieve :
-the class where the current method is stored
-the selector of the current method
-arguments names and their values

After fileIn the file, open a Transcript and evaluate the code provided 
in the VerboseHello class comment.
Noury
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Reflection.st
Type: application/text
Size: 1996 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050823/58383e23/Reflection.bin
-------------- next part --------------


Le 23 ao?t 05, ? 10:06, Houssam Fakih a ?crit :

> Hi all,
> ?
> How I get in the code of a method its name and its arguments?
> ?
> If I have for instance the method
> my: arg1 method: arg2
> ?
> I would like in the code of my:method: to get the selector 
> (#my:method:) and the args ({arg1.arg2}).
> ?
> Thanks,
> Houssam
> ?
> ____
> "Le paradis touche les pieds des m?res..."
> >>> http://csl.ensm-douai.fr/fakih
> ?
>
>
--------------------------------------------------------------
Dr. Noury Bouraqadi - Enseignant/Chercheur
Ecole des Mines de Douai - Dept. G.I.P
http://csl.ensm-douai.fr/noury

European Smalltalk Users Group Board
http://www.esug.org

Squeak: an Open Source Smalltalk
http://www.squeak.org
--------------------------------------------------------------


More information about the Squeak-dev mailing list