[squeak-dev] Re: Small question about ReadOnlyVariableBinding

Ricardo Moran richi.moran at gmail.com
Wed Nov 23 13:21:26 UTC 2011

> It's a hack, sure, but what could possibly go wrong? SerialPort isn't used
> for anything system-critical.

Yes, that's what I thought but since I don't usually put my hands in this
part of the system I wanted to make sure I won't find any weird problem
later :)

> This should work fine. ReadOnlyVariableBindings are there to protect
> against accidentally overwriting system globals (i.e., when executing
> "Array := new" in a workspace which is one of my favorite mistakes :-) But
> as long as you know what you're doing, go ahead.
> BTW, it will be faster to install your class if you do the following (it
> avoids the need to recompile all references):
>        [SerialPort := SqueakSerialPort]
>                on: AttemptToWriteReadOnlyGlobal
>                do:[:ex| ex resume: true].

Thanks for the explanation and the code snippet. I'll give it a try then :)


> Cheers,
>  - Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20111123/e4679661/attachment.htm

More information about the Squeak-dev mailing list