当前位置: 首页>>代码示例>>Python>>正文


Python History.removeHistoryListener方法代码示例

本文整理汇总了Python中pyjamas.History.removeHistoryListener方法的典型用法代码示例。如果您正苦于以下问题:Python History.removeHistoryListener方法的具体用法?Python History.removeHistoryListener怎么用?Python History.removeHistoryListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyjamas.History的用法示例。


在下文中一共展示了History.removeHistoryListener方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _set_history_listener

# 需要导入模块: from pyjamas import History [as 别名]
# 或者: from pyjamas.History import removeHistoryListener [as 别名]
    def _set_history_listener(self, on, on_period=251):
        '''
        pyjamas/library/pyjamas/History.py is checking every 250ms if URL has changed
        
        By default, BuoyService checks every 250+1ms before turning its listener back on.
        An initial call in BuoyService() set-up needs to set on_period to 1 for immediate listening

        Rapid UI-interaction can lead to multiple nested calls.
        A count is kept to control when to add/remove the sole history listener.
        If a count wasn't kept then History will wobble
        '''
        if on:
            self.timer = Timer(on_period, self)
        else:
            if self.timer_count == 1:
                History.removeHistoryListener(self)
            self.timer_count -= 1
开发者ID:anandology,项目名称:pyjamas,代码行数:19,代码来源:buoy.py


注:本文中的pyjamas.History.removeHistoryListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。