Skip to content

KVC KVO Binding Support

drewwilson edited this page Sep 13, 2010 · 7 revisions

$.valueForKey(obj, key, value);

Look for either a method named test or a property named test.


$(obj).valueForKey("test");

$.valueForKeyPath(obj, path, value);


$(obj).valueForKeyPath("obj1.obj2.name");

$.observe(obj, path, fn);


$(obj).observe("obj1", function(){});

$.unobserve(obj, path, fn);


$(obj).unobserve("obj", fn);

$.connect(from, fromAttr, to, toAttr);


$(obj).connect("name", obj2, "a.b.c.d.name");

$.disconnect


$(obj).disconnect("name", obj2, "a.b.c.d.name");