edit_dialog.py 文件源码

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

项目:Enrich2 作者: FowlerLab 项目源码 文件源码
def validate(self):
        """
        Called when the user chooses "OK", before closing the box.

        Also checks that child name is unique.
        """
        for tk_list in self.frame_dict.values():
            if not all(x.validate() for x in tk_list):
                return False

        if self.element.parent is not None:
            if self.element not in self.element.parent.children:
                if self.name_entry.value.get() in self.element.parent.child_names():
                    tkMessageBox.showwarning("", "Sibling names must be unique.")
                    return False

        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号