nsIViewManager* vm = (nsIViewManager*)viewManagers->ElementAt(index);
nsViewManager* vm = (nsViewManager*)viewManagers->ElementAt(index);
  void HandleEvent() {      NS_ASSERTION(nsnull != mViewManager,"ViewManager is null");    // Search for valid view manager before trying to access it    // This is just a safety check. We should never have a circumstance    // where the view manager has been destroyed and the invalidate event    // which it owns is still around. The invalidate event should be destroyed    // by the RevokeEvent in the viewmanager's destructor.    PRBool found = PR_FALSE;    PRInt32 index;    PRInt32 count = nsViewManager::GetViewManagerCount();    const nsVoidArray* viewManagers = nsViewManager::GetViewManagerArray();    for (index = 0; index < count; index++) {      nsIViewManager* vm = (nsIViewManager*)viewManagers->ElementAt(index);      if (vm == mViewManager) {        found = PR_TRUE;      }    }    if (found) {      ((nsViewManager *)mViewManager)->ProcessInvalidateEvent();    } else {      NS_ASSERTION(PR_FALSE, "bad view manager asked to process invalidate event");    }  };