...makes me envy the simplicity of SELF! Fernando On Mon, Sep 24, 2012 at 10:38 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 24 September 2012 08:53, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
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.
err, what is missing? class is an object, and using #instVarNamed: on them is perfectly fine.
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.
-- Best regards, Igor Stasenko.