[modules] Policy for Readonly bindings?

Henrik Gedenryd h.gedenryd at open.ac.uk
Fri Mar 8 09:26:58 UTC 2002


Im posting this question to the list...

Ted Kaehler wrote:

> 
> TextConstants redefineName: newName as: thisValue export: true
> 
> but it fails.  Every binding appears to be ReadOnly.  How can I
> change that?  It seems to me that the 'redefine' message should allow
> me to change the value, even if it is read-only!  What else would
> redefine be for?

In good old Squeak style, the ReadOnly bindings were slapped onto the image
without warning when I was halfway through the project, and I didn't know
what to do with them. I opted to make all globals in all modules be
read-only, but that may not have been an ideal choice. For some reason, the
ReadOnly exception handler is written not to allow you to Proceed with
changing the value even if you want to.

If someone can come up with a reasonable and simple policy for which
bindings should be read-only and which ones shouldn't in a modular world,
then I would be happy to go along with it.

Henrik




More information about the Squeak-dev mailing list