[Glass] write stream problem with quotes

Mariano Martinez Peck marianopeck at gmail.com
Mon Feb 17 05:19:34 PST 2014


Thanks guys. I was some days off and I didn't have the time to really
analyze the problem. You just fixed it in a couple of minutes! Thanks a lot.

Indeed, it makes total sense. I remember we were discussing that in Pharo
some months ago...because so far in Pharo literals are mutable ;)


On Fri, Feb 14, 2014 at 9:30 PM, Dale Henrichs <
dale.henrichs at gemtalksystems.com> wrote:

> Paul is correct ... the literal strings are invariant, so you can't
> accidentally or on purpose change the semantics of a compiled method by
> fiddling with a String literal ...
>
> You can create your own invariant objects if you want to (invariant
> objects are useful in some contexts) by sending the #immediateInvariant and
> test using #isInvairant ...
>
> Dale
>
>
> On Fri, Feb 14, 2014 at 4:25 PM, Paul DeBruicker <pdebruic at gmail.com>wrote:
>
>> Use
>>
>> String new
>>
>> rather than
>>
>>
>> ''
>>
>>
>>
>>
>>
>>
>>
>>
>> Mariano Martinez Peck wrote
>> > Hi guys,
>> >
>> > I am trying to write a stream and this simply fails:
>> >
>> > '' writeStream nextPutAll: ' '' '
>> >
>> > with a
>> >
>> > a ArgumentTypeError occurred (error 2031), reason:markWritten.a, Attempt
>> > to
>> > modify invariant object,
>> >
>> > Any idea?
>> >
>> > thanks
>> >
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
>> >
>> > _______________________________________________
>> > Glass mailing list
>>
>> > Glass at .gemtalksystems
>>
>> > http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Glass-write-stream-problem-with-quotes-tp4743914p4743916.html
>> Sent from the GLASS mailing list archive at Nabble.com.
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>
>
> _______________________________________________
> 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/20140217/1cf3e6e6/attachment.html>


More information about the Glass mailing list