public void put(String name, Scriptable start, Object value) {
	    try {
		ObjectLocation variable = this.extractFieldVariable(name);
		if (value instanceof NativeArray) {
		    // FIXME this breaks referential equality, but maybe it's OK
		    variable.set(this.sequenceFromArray((NativeArray)value, start));
		    return;
		}
		//System.err.println("variable " + variable + " new value " + value + " type " + variable.getClass().getName());
		if (variable instanceof FloatLocation) { // FIXME FIXME super ad-hoc
		    value = Context.jsToJava(value, Float.class);
		} else if (value instanceof ObjectLocation) {
		    // here's a place where two locations could be bound to each other?
		    value = ((ObjectLocation)value).get();
		} else if (value instanceof Wrapper) {
		    // FIXME is there a better way???
		    value = ((Wrapper)value).unwrap();
		    if (value instanceof ObjectLocation) {
			value = ((ObjectLocation)value).get();
		    }
		}
		variable.set(value); 
		return;
	    } catch (Exception e) { 
		e.printStackTrace(System.err);
	    }
	}
public void put(String name, Scriptable start, Object value) {
	    try {
		ObjectLocation variable = this.extractFieldVariable(name);
		if (value instanceof NativeArray) {
		   
		    variable.set(this.sequenceFromArray((NativeArray)value, start));
		    return;
		}
	
		if (variable instanceof FloatLocation) {
		    value = Context.jsToJava(value, Float.class);
		} else if (value instanceof ObjectLocation) {
		   
		    value = ((ObjectLocation)value).get();
		} else if (value instanceof Wrapper) {
		   
		    value = ((Wrapper)value).unwrap();
		    if (value instanceof ObjectLocation) {
			value = ((ObjectLocation)value).get();
		    }
		}
		variable.set(value); 
		return;
	    } catch (Exception e) { 
		e.printStackTrace(System.err);
	    }
	}
public void put(string name, scriptable start, object value) { try { objectlocation variable = this.extractfieldvariable(name); if (value instanceof nativearray) { variable.set(this.sequencefromarray((nativearray)value, start)); return; } if (variable instanceof floatlocation) { value = context.jstojava(value, float.class); } else if (value instanceof objectlocation) { value = ((objectlocation)value).get(); } else if (value instanceof wrapper) { value = ((wrapper)value).unwrap(); if (value instanceof objectlocation) { value = ((objectlocation)value).get(); } } variable.set(value); return; } catch (exception e) { e.printstacktrace(system.err); } }