logviewer.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:mobileinsight-mobile 作者: mobile-insight 项目源码 文件源码
def goto_ok(self, *args):
        rows = len(self.data_view)
        num = self.goto_textinput.text
        if num.isdigit():
            if int(num) > 0 and rows >= int(num):
                if int(num) >= rows - 12:
                    self.k = rows
                    self.dismiss_goto_popup()
                    self.SetUpGrid(self.data, len(self.data), 'over')
                else:
                    self.k = int(num) - 1
                    self.dismiss_goto_popup()
                    if self.k >= rows - 24:
                        self.SetUpGrid(self.data, len(self.data), '')
                    else:
                        self.SetUpGrid(self.data, len(self.data), 'up!')
                Clock.unschedule(self.check_scroll_limit)
                Clock.schedule_interval(self.check_scroll_limit, 0.11)
            else:
                self.dismiss_goto_popup()
                goto_failed_popup = Popup(
                    title='Error', content=Label(
                        text='Please write an integer in the given range'), size_hint=(
                        0.8, 0.2))
                goto_failed_popup.open()
        else:
            self.dismiss_goto_popup()
            goto_failed_popup = Popup(
                title='Error', content=Label(
                    text='Please write an integer in the given range'), size_hint=(
                    0.8, 0.2))
            goto_failed_popup.open()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号