On Sep 24, 2012, at 1:56 AM, Igor Stasenko wrote:
okay, i found what is wrong with first post (didn't read carefully).
The instVarNames is a class-side protocol i.e. part of a class behavior, while instVarNamed: is an instance-side protocol i.e. "hackishly access to instance variable with given name"
Yes this is exactly my point. I think that there is a protocol missing for class to be consistent.
So, this is ok: Nautilus class instVarNames -> #('maxSize' 'cachedLastClasses' 'groups')
And this is ok too:
Nautilus instVarNamed: 'groups' worked
because Nautilus is an instance of its metaclass.
But this is wrong, since 'Nautilus class' is an instance of Metaclass, and metaclass doesn't have 'groups' variable.
Nautilus class instVarNamed: 'groups' -> error
-- Best regards, Igor Stasenko.