Alejandro F. Reimondo | 9 Sep 1997 02:15

numArgs for #, and #->

Hi,

I've found the message #numArgs for strings (and Symbols)
 that returns the number of arguments spected for aSelector.
It works fine for normal selectors, but have problems
 with #, and #-> selectors.

They are not recognized as valid selector names
 and return value is -1

Evaluating this code returns all the "invalid selectors" used
 in the system

| unKnown |
unKnown := Set new.
Smalltalk allClasses do: [:each|
	unKnown addAll: (
		each selectors
			select: [:selector| selector numArgs < 0 ] )
].
unKnown asArray

Looking in the String>>#numArgs method I've found
 that the #- selector is handled returning ^1,
 I think that #, and #-> must also return 1.

Ale.


Gmane