reflection

Philippe Marschall philippe.marschall at gmail.com
Tue Jul 18 13:36:35 UTC 2006


(1 to: thisContext method numArgs) collect: [ :each | thisContext tempAt: each ]

I'm sure there's a better way.

Philippe


2006/7/18, Niko Schwarz <niko.schwarz at gmx.net>:
> I want to write a Wikipedia article about "Jacketing" and I thought a cool squeak snippet would show both how cool I am and how jacketing works. Unfortunately, the snippet is growing. I wanted to write it neatly short, like this (no callback:)
>
> unblock: selector
>         "Macht den blockierenden Aufruf selector unblockierend."
>         |bs|
>         bs := (#blocking , selector) asSymbol. "Der alte Aufruf wird umbenannt"
>
>         self
>                 addSelector: bs
>              withMethod: (self methodAt: selector).
>       self addSelector: selector
>                 withMethod: (self class compile: '[self perform: selector withArgs:args] fork')
>
>
> but as you probably noticed already, withArgs:args is not quite possible this way. Is there a short line of code that deals with it?
>
> niko
> --
>
>
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
>



More information about the Squeak-dev mailing list