listen.js
/* this method will be assigned to boundobjects specified when listening events.
when this method is called on that boundobject, all registrations bound will be released! */
this method will be assigned to boundobjects specified when listening events.
when this method is called on that boundobject, all registrations bound will be released!
this method will be assigned to boundobjects specified when listening events . when this method is called on that boundobject all registrations bound will be released!
function _releaseListens(){
    var attrs_setup_list = this.__listening__ || [];
    for(var i = this.__listening__.length-1; i >= 0; i --){
        var obj = this.__listening__[i][0];
        var attr = this.__listening__[i][1];
        var method = this.__listening__[i][2];
        var listened_list = obj.__listeners__[attr] || [];
        for(var j = listened_list.length-1; j >= 0; j --)
            if(listened_list[j][0] == method){
                obj.__listeners__[attr].remove(j);
                if(obj.__listeners__[attr].length == 0)
                    delete obj.__listeners__[attr];
                break;
            }   
        this.__listening__.remove(i);
    }
}
function _releaseListens ( ) { var attrs_setup_list = this . __listening__ || [ ] ; for ( var i = this . __listening__ . length - 1 ; i >= 0 ; i -- ) { var obj = this . __listening__ [ i ] [ 0 ] ; var attr = this . __listening__ [ i ] [ 1 ] ; var method = this . __listening__ [ i ] [ 2 ] ; var listened_list = obj . __listeners__ [ attr ] || [ ] ; for ( var j = listened_list . length - 1 ; j >= 0 ; j -- ) if ( listened_list [ j ] [ 0 ] == method ) { obj . __listeners__ [ attr ] . remove ( j ) ; if ( obj . __listeners__ [ attr ] . length == 0 ) delete obj . __listeners__ [ attr ] ; break ; } this . __listening__ . remove ( i ) ; } }
this method will be assigned to boundobjects specified when listening events.
this method will be assigned to boundobjects specified when listening events .
/* for all the recorded registrations-to-remove */ /* use that information to find the registration (going backwards) removing them. */ /* remove the entry as we empty it -- reset() requires this although remove() would have dumped this anyway. */