From f1ab57a9daeaa1f8e99013a6eaa252431fef6bb5 Mon Sep 17 00:00:00 2001 From: pravic Date: Fri, 3 Feb 2017 21:26:45 +0300 Subject: [PATCH] dom: Fix fire_event. --- sciter/dom.py | 8 ++++---- setup.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sciter/dom.py b/sciter/dom.py index fd92622..0fb0ebc 100644 --- a/sciter/dom.py +++ b/sciter/dom.py @@ -537,13 +537,13 @@ def post_event(self, code: BEHAVIOR_EVENTS, reason=EVENT_REASON.SYNTHESIZED, sou self._throw_if(ok) return self - def fire_event(self, source, target, code: BEHAVIOR_EVENTS, reason=EVENT_REASON.SYNTHESIZED, post=True, data=None): - """Send or post sinking/bubbling event to the child/parent chain of he element.""" + def fire_event(self, code: BEHAVIOR_EVENTS, reason=EVENT_REASON.SYNTHESIZED, source=None, post=True, data=None): + """Send or post sinking/bubbling event to the child/parent chain of the element.""" params = sciter.capi.scbehavior.BEHAVIOR_EVENT_PARAMS() params.cmd = code params.reason = reason - params.he = source - params.heTarget = target + params.he = source if source else self.h + params.heTarget = self.h if data is not None: sciter.Value.pack_to(params.data, data) handled = sciter.capi.sctypes.BOOL() diff --git a/setup.py b/setup.py index 5e69465..1d4fc23 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ 'url': 'http://github.com/pravic/pysciter/', 'download_url': 'https://github.com/pravic/pysciter/releases', 'bugtrack_url': 'https://github.com/pravic/pysciter/issues', - 'version': '0.4.5', + 'version': '0.4.6', 'platforms': ['Windows', 'Linux', 'MacOS X', ], 'packages': ['sciter', 'sciter.capi'], 'install_requires': [''],