> On 17 Aug 2018, at 14:20, Tim Mackinnon <[email protected]> wrote:
>
> The direct link to instructions is here:
> https://exercism.io/tracks/pharo/installation (not sure if you have to be
> signed up to see it otherwise its in the repo here:
> https://github.com/exercism/pharo/blob/master/docs/INSTALLATION.md)
>
Hm… AllExercismTests seems to not be there (just a green test in Welcome)
Is this supposed to contain the code below (the
createMissingClassActionFor:in:) ?
It would be nice to have an image that shows exactly the problem (I do not have
that much time sadly to work on it,but I do have some time to check if I have
an image that is set up to the point where i can easily recreate the problem)
Marcus
> Tim
>
>> On 17 Aug 2018, at 07:17, Marcus Denker <[email protected]> wrote:
>>
>>
>>
>>> On 17 Aug 2018, at 13:00, Tim Mackinnon <[email protected]> wrote:
>>>
>>>
>>> Hi Marcus - I can put an image somewhere if that helps (do you just need
>>> the .image and .changes)?
>>>
>>> Or you can repro from a fresh 6.1 if you follow the exercism Pharo
>>> instructions (https://exercism.io/tracks/pharo) to load the first hello
>>> world-world example and run the tests. This has my code changes to make
>>> create work with a nil class - but maybe we can do better?
>>>
>> I will do that and have a look!
>>
>>> Tim
>>>
>>>
>>> Sent from my iPhone
>>>
>>> On 17 Aug 2018, at 06:21, Marcus Denker <[email protected]> wrote:
>>>
>>>>
>>>>
>>>>> On 10 Aug 2018, at 23:16, Tim Mackinnon <[email protected]> wrote:
>>>>>
>>>>> Actually I think I figured that bit out - a bit clumsily - (pointers
>>>>> appreciated)
>>>>>
>>>>> createMissingClassActionFor: aMessage in: aContext
>>>>> |errorNode senderContext newClass variableNode |
>>>>> senderContext := aContext sender.
>>>>> errorNode := senderContext method sourceNodeExecutedForPC:
>>>>> senderContext pc.
>>>>> variableNode := errorNode receiver receiver.
>>>>>
>>>>> newClass := OCUndeclaredVariableWarning new node: variableNode;
>>>>> defineClass: variableNode name.
>>>>> aContext restart.
>>>>>
>>>>> However that last line is wrong, as it doesn’t restart with my newly
>>>>> defined class - I also tried
>>>>>
>>>>> aContext restartWithNewReceiver: newClass
>>>>>
>>>>> But again, I get a debugger where my class is still bound to nil. So
>>>>> what’s the trick to re-evaluate with the new class I’ve created? Or maybe
>>>>> I’m totally on the wrong track (still its very interesting…)
>>>>>
>>>>
>>>>
>>>> what is a bit bad is that you catch the problem “too late” (that is, the
>>>> DNU to nil, not the read of nil), so nil is already pushed on the stack at
>>>> this point.
>>>>
>>>> I tried it in the inspector and at least the class binding was correct
>>>> after defining the class… do you have an image with the whole code to try?
>>>>
>>>> Marcus
>>>>
>>>>
>>
>