rem: {   var i, name; try { if (InSearchMode()) {     var outlinerSelection = gSearchView.selection; for (i=0;i<outlinerSelection.getRangeCount();i++) { var start = new Object; var end = new Object; outlinerSelection.getRangeAt(i,start,end); for (var k=start.value;k<=end.value;k++) { name = gSearchView.getCellText(k,"nameCol");    SetState(escape(name),state); } }  InvalidateSearchOutliner(); } else {  var groupList = gSubscribeTree.selectedItems; for (i=0;i<groupList.length;i++) { var group = groupList[i]; name = group.getAttribute('name'); SetState(name,state); 
add: var sel = view.selection; for (var i = 0; i < sel.getRangeCount(); ++i) { var start = {}, end = {}; sel.getRangeAt(i, start, end); for (var k = start.value; k <= end.value; ++k) { var name = view.getCellText(k, colId);    SetState(escape(name), state); 
context: function SetSubscribeState(state)    {   var i, name;  try {    if (InSearchMode()) {        // if we are in "search" mode, we need to iterate over the        // outliner selection, and set the state for all elements        // in the selection                var outlinerSelection = gSearchView.selection;         for (i=0;i<outlinerSelection.getRangeCount();i++) {          var start = new Object;          var end = new Object;          outlinerSelection.getRangeAt(i,start,end);          for (var k=start.value;k<=end.value;k++) {            name = gSearchView.getCellText(k,"nameCol");            // we need to escape the name because            // some news servers have newsgroups with non ASCII names            // we need to escape those name before calling SetState()            SetState(escape(name),state);          }        }        // force a repaint of the outliner since states have changed        InvalidateSearchOutliner();    }    else {      // we are in the "normal" mode      var groupList = gSubscribeTree.selectedItems;      for (i=0;i<groupList.length;i++) {        var group = groupList[i];        name = group.getAttribute('name');        SetState(name,state);      }    }  }  catch (ex) {    //dump("SetSubscribedState failed:  " + ex + "\n");  }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/d38a0937d9c93a0a9d913e2ac781e4328bb8cc73/subscribe.js/buggy/mailnews/base/resources/content/subscribe.js