On Wed, Sep 18, 2013 at 7:47 PM, Stéphane Ducasse
<[email protected]> wrote:
>
> On Sep 18, 2013, at 5:28 PM, Martin Dias <[email protected]> wrote:
>
>> RGClassDescriptionDefinition should be polymorphic with
>> ClassDescription. But #instVarNamed: is protocol of Object, so why to
>> override it there?
>>
>> Concretely, I have instances of RGClassDefinition and I can't:
>>
>> 1) inspect them as regular objects
>> 2) use STON to serialize
>>
>> Because both use #instVarNamed:, which is answering nil.
>
> but why does it answer nil and not the object?

you can try by inspecting this, for example:

Integer asRingDefinition

if you click in the inspector on 'annotations', which is an instvar of
RGClassDefinition, what you see is nil. This is because #instVarNamed:
tries to find 'annotations' in Integer (not in the RGClassDefinition).

Reply via email to