[General] Why doesn't an 'accept changes' on border colour affect the colour?

Dan Ingalls Daniel.Ingalls at sun.com
Mon Mar 24 18:26:19 CET 2008

Andy Burnett  asked...

>Changing e.g. fishEye to true, changes the object behaviour. However, setting the rgb() value to something new has no effect. How come?

Hello, Andy -

There is no general dependence mechanism in JavaScript so that changes to values get magically acted on.  It happens that the fisheye mechanism tests the fishEye property in such a way that only setting the flag is necessary.

However if you want a morph's color to change, you should use the setFill() method.  This will take care of the necessary and appropriate propagation of change so that the SVG graphic routines get appropriately informed.

In general we favor a procedural interface for such changes.  We have toggleFisheye(), but should probably also have setFisheye(trueOrFalse).

Hope this helps

	- Dan

More information about the lively-kernel mailing list