Redefining an Assignment Slot?

R James Noble kjx at comp.vuw.ac.nz
Thu Feb 25 02:59:57 UTC 1993


>  Is there a way to redefine an assignment slot.
> i.e. Do something like point x: = ( display NeedRedraw. <- )

In my widget system I often need to do this. What I do is 
	o rename the original variable "foo" to "iFoo" 
		("i" for instance or internal)
	o define "foo" and "foo:" in terms of "iFoo" and "iFoo:"
		with whatever wrapping is needed.

I guess the advantage of a separation between methods and variables
(as in Smalltalk) are the two distinct name spaces - you can have both
messages and variables with the same names. On the whole, Self's
scheme is simpler, but it does seem to occasionally a little bit of
name mangling.

BTW - I'd be interested to hear about what you are doing with Self -
your example sounds interesting.  I'm trying to write a dynamic
program visualisation system in Self - there may be a screen dump in
contrib on otis showing some recent work.

kjx




More information about the Self-interest mailing list