From 4f221b1933b244f2e6372c969225e71eb64d8ea5 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 10 Jun 2021 10:56:34 +0800 Subject: [PATCH] bugfix --- kivyblocks/blocks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kivyblocks/blocks.py b/kivyblocks/blocks.py index 31aca6e..2564335 100755 --- a/kivyblocks/blocks.py +++ b/kivyblocks/blocks.py @@ -310,6 +310,7 @@ class Blocks(EventDispatcher): for k,v in [(k,v) for k,v in desc.items() if k not in excludes]: if isinstance(v,dict) and v.get('widgettype'): b = Blocks() + v = self.valueExpr(v, localnamespace={'self':widget}) w = b.w_build(v) if hasattr(widget,k): aw = getattr(widget,k) @@ -327,7 +328,8 @@ class Blocks(EventDispatcher): pos = 0 for pos,sw in enumerate(desc.get('subwidgets',[])): b = Blocks() - kw = sw.copy() + kw = self.valueExpr(sw.copy(), + localnamespace={'self':widget}) w = b.widgetBuild(kw) widget.add_widget(w)