def incrementalAdd(self, hint):
     log.log("HintRegisterBrowser.incrementalAdd", [hint], 0)
     #c = Counter()
     if not self._initialized:
         log.log("HintRegisterBrowser.incrementalAdd return", [], 2)
         return
     if not self._smart:
         self.reinitialize()
         ind = self.__binaryFind(hint)
         RegisterBrowser._select(self, ind, veto=True)
         log.log("HintRegisterBrowser.incrementalAdd return", [], 3)
         return
     ind = self.__binaryFind(hint)
     if ind == len(self.__hints):
         #self._items.append(len(self._items))
         self._elements.append(stru(hint))
         self._elementLabels.append(ustr(hint))
     else:
         #self._items.insert(ind, ind)
         self._elements.insert(ind, stru(hint))
         self._elementLabels.insert(ind, ustr(hint))
     self._itemsNo += 1
     #print c
     self._reloadSelect(ind, veto=True)
     log.log("HintRegisterBrowser.incrementalAdd return", [], 1)
 def _reloadSelect(self, itemId, veto=False):
     log.log("WindowRegisterBrowser._reloadSelect", [self._smart], 0)
     if not self._smart:
         log.log("WindowRegisterBrowser._reloadSelect return", [], 2)
         return
         # TODO: A co wtedy - chyba niepotrzebne bo i tak robimy reinitialize w incrementalAdd
         # jedyny problem moze sie pojawic wtedy kiedy wykaz po incrementalAdd robi sie nagle
         # smart?
     self._scrollBrowser(itemId)
     RegisterBrowser._select(self, itemId, veto=veto)
     log.log("WindowRegisterBrowser._reloadSelect return", [], 1)
 def _select(self, itemId, veto=False):
     #mapsafe
     #print itemId, self._window, self.__len
     log.log("WindowRegisterBrowser._select",
             [itemId, veto, self._window, self._smart], 0)
     if self._smart and (itemId < self._window
                         or itemId >= self.LIMIT() + self._window):
         #print "tu"
         self._scrollBrowser(itemId)
     #print "ok"
     RegisterBrowser._select(self, itemId, veto=veto)
     log.log("WindowRegisterBrowser._select return", [], 1)