From cf27475fea0d030c333734244646b17c066ed1a7 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 1 Dec 2020 05:50:43 +0800 Subject: [PATCH] bugfix --- kivyblocks/blocks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kivyblocks/blocks.py b/kivyblocks/blocks.py index f51f28b..51a746d 100755 --- a/kivyblocks/blocks.py +++ b/kivyblocks/blocks.py @@ -478,6 +478,10 @@ class Blocks(EventDispatcher): name = desc['widgettype'] def doit(desc): + if not isinstance(desc,dict): + print('desc must be a dict object',desc,type(desc)) + raise Exception('desc must be a dict') + desc = self.valueExpr(desc) widget = self.__build(desc) self.dispatch('on_built',widget) @@ -509,6 +513,7 @@ class Blocks(EventDispatcher): def getWidgetById(self,id,from_widget=None): app = App.get_running_app() if id in ['root','/self']: + print('return app.root',app.root) return app.root if id=='self': return from_widget