All pastes #942462 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-03-14 15:16 UTC
rendered paste body
        if entity:
            msgchn = entity.QueryMessageChannel()
            #Create dispatchers
            self._send_active = msgchn.CreateMessageDispatcher(self, self._msg_active).SendMessage
            self._send_inactive = msgchn.CreateMessageDispatcher(self, self._msg_inactive).SendMessage
            #Subscribe to messages
            if self._entity:
                self._entity.QueryMessageChannel().UnSubscribe(self,"cel.mesh.select.move")
                self._entity.QueryMessageChannel().UnSubscribe(self,"cel.timer.nomouseover")
            msgchn.Subscribe(self,"cel.mesh.select.move")
            msgchn.Subscribe(self,"cel.timer.nomouseover")

        self._entity = entity