setBaseVal() bindings

Some clarification about the expected behaviour in the following situation
please: the various SVGAnimated* interfaces contain setBaseVal() methods
that allow the user to set base values for various attributes.  These
setBaseVal() methods take in primitive type objects such as SVGLength etc.
 What happens if the user passes in the same object as an argument to two
disparate setBaseVal() methods?   The following code fragment illustrates
the problem concisely:

	SVGSVGElement svg1 = (SVGSVGElement&)doc.createElement("svg");
	SVGCircleElement circle1 = (SVGCircleElement&)doc.createElement("circle");

	SVGAnimatedLength cx = circle1.getCx();
	SVGAnimatedLength cy = circle1.getCy();

	SVGLength ln = svg1.createSVGLength();	   // create unbound SVGLength

	cx.setBaseVal(ln);		// binds ln to cx
	cy.setBaseVal(ln);		// ln is already bound to cx; is this valid?

	ln.setValue(22.2f);		// should cx AND cy now be 22.2, or only one?
					// if only one, which one?

This illustration can be extended to the case where ln is passed as a
paremeter to setBaseVal() methods in two or more different elements as
well. e.g.

	[code fragment as above, followed by...]

	SVGRectElement rect1 = (SVGRectElement&)doc.createElement("rect");

	SVGAnimatedLength x = rect1.getX();
	SVGAnimatedLength y = rect1.getY();

	x.setBaseVal(ln);	// ln is already bound
	y.setBaseVal(ln);	// ditto

	ln.setValue(33.3f);	// should ALL of the base values now be 33.3?

Steven Dickson, Software Developer,
Savage Software

Received on Tuesday, 3 October 2000 20:38:57 UTC