rem:  var SearchTree = document.getElementById( UnifinderTreeName );  /* The following is a brutal hack, caused by http: and described in bug 168211 http: Do NOT remove anything in the next 3 lines, or the selection in the tree will not work. */  SearchTree.treeBoxObject.selection.selectEventsSuppressed = true; SearchTree.onselect = null; SearchTree.removeEventListener( "select", unifinderOnSelect, true );  if( EventSelectionArray.length > 1 ) { /* selecting all events is taken care of in the selectAllEvents in calendar.js ** Other than that, there's no other way to get in here. */ if( gSelectAll === true ) { SearchTree.treeBoxObject.selection.selectAll( );  gSelectAll = false; } } else if( EventSelectionArray.length == 1 ) { var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] );  if( RowToScrollTo != "null" ) { SearchTree.treeBoxObject.selection.clearSelection( );  SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo );  SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 ); } } else SearchTree.treeBoxObject.selection.clearSelection( );  /* This needs to be in a setTimeout */ setTimeout( "resetAllowSelection()", 1 ); 
add: selectSelectedEventsInTree( EventSelectionArray ); 
context:       onSelectionChanged : function( EventSelectionArray )      {         //dump( "\nCALENDAR unifinder.js->on selection changed" );         var SearchTree = document.getElementById( UnifinderTreeName );                     /* The following is a brutal hack, caused by          http://lxr.mozilla.org/mozilla1.0/source/layout/xul/base/src/tree/src/nsTreeSelection.cpp#555         and described in bug 168211         http://bugzilla.mozilla.org/show_bug.cgi?id=168211         Do NOT remove anything in the next 3 lines, or the selection in the tree will not work.         */         SearchTree.treeBoxObject.selection.selectEventsSuppressed = true;         SearchTree.onselect = null;         SearchTree.removeEventListener( "select", unifinderOnSelect, true );                  if( EventSelectionArray.length > 1 )         {            /* selecting all events is taken care of in the selectAllEvents in calendar.js             ** Other than that, there's no other way to get in here. */            if( gSelectAll === true )            {               SearchTree.treeBoxObject.selection.selectAll( );                              gSelectAll = false;            }         }         else if( EventSelectionArray.length == 1 )         {            var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventSelectionArray[0] );                           if( RowToScrollTo != "null" )            {               SearchTree.treeBoxObject.selection.clearSelection( );                        SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo );               SearchTree.treeBoxObject.selection.timedSelect( RowToScrollTo, 1 );            }         }         else            SearchTree.treeBoxObject.selection.clearSelection( );                  /* This needs to be in a setTimeout */         setTimeout( "resetAllowSelection()", 1 );      }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/faf1dd7c80dcb8e596334b3a6a368a306afc2aa9/unifinder.js/buggy/calendar/resources/content/unifinder.js