[squeak-dev] Small question about ReadOnlyVariableBinding
Ricardo Moran
richi.moran at gmail.com
Tue Nov 22 20:52:41 UTC 2011
Hi guys,
I have just a small question: how dangerous would it be if I change a
system dictionary association (such as #SerialPort) to be a read-write
binding?
I want to be able to provide a different abstraction for SerialPort than
the one squeak provides, but I don't want to change all the code that uses
it. So I though a quick and dirty way to do it would be to replace it in
the SystemDictionary, like this:
Smalltalk at: #SqueakSerialPort put: SerialPort.
> (Smalltalk associationOrUndeclaredAt: #SerialPort) beReadWriteBinding.
> Smalltalk at: #SerialPort put: MySerialPort
Apart from being an ugly hack, do you think that could be dangerous in some
way?
Thanks in advance,
Richo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20111122/6bb47630/attachment.htm
More information about the Squeak-dev
mailing list
|