[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redefining an Assignment Slot?

>  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.