def dispossessUI(self): if self.uiHolder: self.uiHolder.removeExternalCallback(BTMS_COMMANDS.CheckCooldownPeriod(), self.__onCheckCooldownPeriod) self.uiHolder.removeExternalCallback(BTMS_COMMANDS.SendMessage(), self.__onSendChannelMessage) self.uiHolder.removeExternalCallback(BTMS_COMMANDS.ReceiverChanged(), self.__onReceiverChanged) super(BattleChannelView, self).dispossessUI() self.__controllers.clear() self.__sharedHistory = lambda : None
def populateUI(self, proxy): super(BattleChannelView, self).populateUI(proxy) self.uiHolder.addExternalCallbacks({ BTMS_COMMANDS.CheckCooldownPeriod(): self.__onCheckCooldownPeriod, BTMS_COMMANDS.SendMessage(): self.__onSendChannelMessage, BTMS_COMMANDS.ReceiverChanged(): self.__onReceiverChanged })
def dispossessUI(self): if self.uiHolder: self.uiHolder.removeExternalCallback( BTMS_COMMANDS.CheckCooldownPeriod(), self.__onCheckCooldownPeriod) self.uiHolder.removeExternalCallback(BTMS_COMMANDS.SendMessage(), self.__onSendChannelMessage) self.uiHolder.removeExternalCallback( BTMS_COMMANDS.ReceiverChanged(), self.__onReceiverChanged) super(BattleChannelView, self).dispossessUI()
def populateUI(self, proxy): super(BattleChannelView, self).populateUI(proxy) self.uiHolder.addExternalCallbacks({ BTMS_COMMANDS.CheckCooldownPeriod(): self.__onCheckCooldownPeriod, BTMS_COMMANDS.SendMessage(): self.__onSendChannelMessage, BTMS_COMMANDS.ReceiverChanged(): self.__onReceiverChanged }) controller = self._controller() if controller and controller.getChannel().isJoined(): self.setJoined()
def dispossessUI(self): self.__flashCall(BTMS_COMMANDS.ClearMessages()) if self.__ui: self.__ui.removeExternalCallbacks( BTMS_COMMANDS.PopulateUI(), BTMS_COMMANDS.CheckCooldownPeriod(), BTMS_COMMANDS.SendMessage(), BTMS_COMMANDS.ChangeFocus(), BTMS_COMMANDS.AddToFriends(), BTMS_COMMANDS.RemoveFromFriends(), BTMS_COMMANDS.AddToIgnored(), BTMS_COMMANDS.RemoveFromIgnored(), BTMS_COMMANDS.AddMuted(), BTMS_COMMANDS.RemoveMuted(), BTMS_COMMANDS.upHistory(), BTMS_COMMANDS.downHistory(), BTMS_COMMANDS.GetLatestHistory()) if self.__view: self.__view.dispossessUI() self.__view = None self.__ui = None
def dispossessUI(self): self.__flashCall(BTMS_COMMANDS.ClearMessages()) if self.__ui: self.__ui.removeExternalCallbacks(BTMS_COMMANDS.PopulateUI(), BTMS_COMMANDS.CheckCooldownPeriod(), BTMS_COMMANDS.SendMessage(), BTMS_COMMANDS.ChangeFocus(), BTMS_COMMANDS.AddToFriends(), BTMS_COMMANDS.RemoveFromFriends(), BTMS_COMMANDS.AddToIgnored(), BTMS_COMMANDS.RemoveFromIgnored(), BTMS_COMMANDS.AddMuted(), BTMS_COMMANDS.RemoveMuted()) while len(self.__views): self.__views.pop().dispossessUI() self.__ui = None return