[Glass] Attempt to modify invariant object, anArray

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Fri Jun 3 17:09:17 PDT 2016


Thank you guys..I was indeed making some default instances with this
literal arrays..and this was the first time I have to edit those..

Thanks!

On Fri, Jun 3, 2016 at 8:46 PM, Richard Sargent <
richard.sargent at gemtalksystems.com> wrote:

> On Fri, Jun 3, 2016 at 1:30 PM, Mariano Martinez Peck via Glass <
> glass at lists.gemtalksystems.com> wrote:
>
>> Hi guys,
>>
>> Quick email as I must leave now... I am trying to run this code:
>>
>> tableSpec table do: [ :aRow |
>> | value |
>> value := (aRow at: 2) = 'L' ifTrue: [ 'Left' ] ifFalse: [ 'Right' ].
>>         aRow at: index put: value
>> ].
>>
>> the 'aRow' array is as simple as anArray ('Price' , 'R', '', '') ...
>> Looks like a problem of passing the array as argument...
>>
>> The error I get is:
>>
>> " ArgumentTypeError(AbstractException)>>_signalFromPrimitive: @5 line 15a
>> ArgumentTypeError occurred (error 2031), reason:markWritten.b, Attempt to
>> modify invariant object, anArray
>>
>> I just don't get it.. grrr must run now..
>>
>
> Hi Mariano,
>
> Given what you have described, the most likely cause is passing in a
> literal array. That guess is further reinforced by using the name
> "tableSpec".
> e.g.
> #(
> ('Price', 'R', '', '')
> ('Quantity', 'R', '', '')
> ('Cost', 'R', '', '')
> )
>
> -- Richard
>
>
>> Cheers,
>>
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20160603/49c867b1/attachment.html>


More information about the Glass mailing list