src/libs/bobject.js
function (key, value) {
        var accessor = getAccessors(this)[key],
            oldVal = this.get(key);


        this.triggerBeforeChanged(key, oldVal);

        if (accessor) {
            accessor.target.set(accessor.key, value);
        } else {

            if (this['set_' + key]) {
                this['set_' + key](value);
            } else {
                this[key] = value;
            }
        }
        this.triggerChanged(key, oldVal);
    }
function (key, value) {
        var accessor = getAccessors(this)[key],
            oldVal = this.get(key);


        this.triggerBeforeChanged(key, oldVal);

        if (accessor) {
            accessor.target.set(accessor.key, value);
        } else {

            if (this['set_' + key]) {
                this['set_' + key](value);
            } else {
                this[key] = value;
            }
        }
        this.triggerChanged(key, oldVal);
    }
function ( key , value ) { var accessor = getAccessors ( this ) [ key ] , oldVal = this . get ( key ) ; this . triggerBeforeChanged ( key , oldVal ) ; if ( accessor ) { accessor . target . set ( accessor . key , value ) ; } else { if ( this [ 'set_' + key ] ) { this [ 'set_' + key ] ( value ) ; } else { this [ key ] = value ; } } this . triggerChanged ( key , oldVal ) ; }
Set a property on the object. Always use this instead of trying to
access the property directly. This will ensure all bindings, setters and
getters work correctly.

@param {String} key Name of property to get
@param {*} value New value for the property
Set a property on the object . Always use this instead of trying to access the property directly . This will ensure all bindings setters and getters work correctly .