More juicy goodness. Event dispatch seems to work now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@20 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: AttributeChangedEvent.java,v 1.2 2001/06/01 19:56:13 mdb Exp $
|
||||
// $Id: AttributeChangedEvent.java,v 1.3 2001/06/01 20:35:39 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.cher.dobj;
|
||||
|
||||
@@ -101,18 +101,17 @@ public class AttributeChangedEvent extends DEvent
|
||||
public boolean applyToObject (DObject target)
|
||||
throws ObjectAccessException
|
||||
{
|
||||
// look up the setter for this object
|
||||
Method setter = DEventUtil.getSetter(target.getClass(), _name);
|
||||
|
||||
try {
|
||||
setter.invoke(target, new Object[] { _value });
|
||||
} catch (Exception e) {
|
||||
throw new ObjectAccessException("Reflection error: " + e);
|
||||
}
|
||||
|
||||
// pass the new value on to the object
|
||||
target.setAttribute(_name, _value);
|
||||
return true;
|
||||
}
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return "[CHANGE:targetOid=" + _toid + ", name=" + _name +
|
||||
", value=" + _value + "]";
|
||||
}
|
||||
|
||||
protected String _name;
|
||||
protected Object _value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user