[Newbies] selectors for an array of classes
Bert Freudenberg
bert at freudenbergs.de
Sun Jul 3 16:47:09 UTC 2011
On 03.07.2011, at 18:35, Jonathan Wright wrote:
>
> Hello,
>
> I am trying to read the methods of several classes. I am getting a
> messagenotunderstood for the following code:
>
> TempObject := #(OrderedCollection Integer).
> TempObject do: [ :iClass |
> iClass selectorsDo: [ :item |
> item.]].
>
> I can run a iClass name successfully.
Try iClass class, that should be enlightening ;)
> But it doesn't seem to recognize iClass selectors.
The "name" message works on any (see Object>>name). iClass is not actually a class in your example.
Hint 1: #() creates a literal array.
Hint 2: Classes are not literals.
Hint 3: {} creates a non-literal array.
Nitpick: temps should have lowercase-names.
- Bert -
More information about the Beginners
mailing list