rem: var columnElement = document.getElementById(column); var sortActive = columnElement.getAttribute("sortActive"); if (sortActive == "true") { this.selectedColumn = column; this.sortDirection = columnElement.getAttribute("sortDirection"); gTaskArray.sort(sortTasks); }  
context:    getCellText : function(row,column)   {      var columnElement = document.getElementById(column);      var sortActive = columnElement.getAttribute("sortActive");      if (sortActive == "true")      {         this.selectedColumn = column;         this.sortDirection = columnElement.getAttribute("sortDirection");         gTaskArray.sort(sortTasks);      }         calendarToDo = gTaskArray[row];      if( !calendarToDo )         return;      switch( column )      {         case "unifinder-todo-tree-col-completed":            return;                  case "unifinder-todo-tree-col-priority":            return;         case "unifinder-todo-tree-col-title":            if( calendarToDo.title == "" )               var titleText = "Untitled";            else                 var titleText = calendarToDo.title;            return( titleText );         case "unifinder-todo-tree-col-startdate":            return( formatUnifinderEventDate( new Date( calendarToDo.start.getTime() ) ) );         case "unifinder-todo-tree-col-duedate":            return( formatUnifinderEventDate( new Date( calendarToDo.due.getTime() ) ) );         case "unifinder-todo-tree-col-completeddate":            return( formatUnifinderEventDate( new Date( calendarToDo.completed.getTime() ) ) );         case "unifinder-todo-tree-col-percentcomplete":            return( calendarToDo.percentcomplete );         case "unifinder-todo-tree-col-categories":            return( calendarToDo.categories );      }   }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/897097470ddfb450c877bc0af08f216b8bd2c246/unifinderToDo.js/clean/calendar/resources/content/unifinderToDo.js