may be we should add it somewhere in symbol because this is handy when
you want to generate methods on the fly.
signatureFromSelector: aSelector
"self new signatureFromSelector: #foo:bar: "
"self new signatureFromSelector: #foo"
"self new signatureFromSelector: #foo:"
| count |
^ String streamContents: [:str|
count := 1.
(ReadStream on: aSelector) do: [:each |
each = $:
ifTrue: [ str nextPut: each.
str nextPutAll: ' arg', count printString, ' '.
count := count + 1]
ifFalse: [str nextPut: each]
]]
On Mar 1, 2009, at 7:18 PM, Stéphane Ducasse wrote:
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project