Re: [Pharo-dev] Are assignment to block variables is prohibited?

2017-09-16 Thread Stephane Ducasse
Yes I checked again and I do not get why it is barking with mark load it.
I will look at the plotmorph code later.


On Thu, Sep 14, 2017 at 10:00 PM, Nicolai Hess  wrote:
>
>
> 2017-09-14 21:43 GMT+02:00 Nicolai Hess :
>>
>> Yes. But there is a setting for the compiler to load/compile code with
>> errors.
>>
>>
>> 2017-09-14 20:46 GMT+02:00 Stephane Ducasse :
>>>
>>> Hi
>>>
>>> I know that method arg are read only and you cannot assign to them.
>>> Now what is the status of block arguments?
>>> Because some old code of plotmorph is breaking.
>>>
>>> Stef
>>>
>
>
> But using catalog, I can load plotmorph, even without enabling this setting.
>
>



Re: [Pharo-dev] Are assignment to block variables is prohibited?

2017-09-15 Thread Marcus Denker

> On 14 Sep 2017, at 22:00, Nicolai Hess  wrote:
> 
> 
> 
> 2017-09-14 21:43 GMT+02:00 Nicolai Hess  >:
> Yes. But there is a setting for the compiler to load/compile code with errors.
> 
> 
> 2017-09-14 20:46 GMT+02:00 Stephane Ducasse  >:
> Hi
> 
> I know that method arg are read only and you cannot assign to them.
> Now what is the status of block arguments?
> Because some old code of plotmorph is breaking.
> 
> Stef
> 
> 
> 
> But using catalog, I can load plotmorph, even without enabling this setting.

OCStoreIntoReadOnlyVariableError checks if you are compiling interactively or 
not.

signal
compilationContext interactive
ifFalse: [ ^ self crTrace ].
^ super signal

This way old code load fine, but you are not allowed to create such code while
coding… and you have to fix code when recompiling a method interactively
that has an assignment to an argument.

Marcus

Re: [Pharo-dev] Are assignment to block variables is prohibited?

2017-09-14 Thread Nicolai Hess
2017-09-14 21:43 GMT+02:00 Nicolai Hess :

> Yes. But there is a setting for the compiler to load/compile code with
> errors.
>
>
> 2017-09-14 20:46 GMT+02:00 Stephane Ducasse :
>
>> Hi
>>
>> I know that method arg are read only and you cannot assign to them.
>> Now what is the status of block arguments?
>> Because some old code of plotmorph is breaking.
>>
>> Stef
>>
>>

But using catalog, I can load plotmorph, even without enabling this setting.


Re: [Pharo-dev] Are assignment to block variables is prohibited?

2017-09-14 Thread Nicolai Hess
Yes. But there is a setting for the compiler to load/compile code with
errors.

2017-09-14 20:46 GMT+02:00 Stephane Ducasse :

> Hi
>
> I know that method arg are read only and you cannot assign to them.
> Now what is the status of block arguments?
> Because some old code of plotmorph is breaking.
>
> Stef
>
>


[Pharo-dev] Are assignment to block variables is prohibited?

2017-09-14 Thread Stephane Ducasse
Hi

I know that method arg are read only and you cannot assign to them.
Now what is the status of block arguments?
Because some old code of plotmorph is breaking.

Stef