dabo Commit Revision 1887 Date: 2006-01-31 18:09:28 -0800 (Tue, 31 Jan 2006) Author: ed
Changed: U trunk/dabo/ui/uiwx/dFormMixin.py U trunk/dabo/ui/uiwx/dPemMixin.py
Log: Fixed the problem I introduced with __getattr__().
Added back the call to Refresh() in the form's refresh() method.
Diff: Modified: trunk/dabo/ui/uiwx/dFormMixin.py =================================================================== --- trunk/dabo/ui/uiwx/dFormMixin.py 2006-02-01 00:36:52 UTC (rev 1886) +++ trunk/dabo/ui/uiwx/dFormMixin.py 2006-02-01 02:09:28 UTC (rev 1887) @@ -483,6 +483,7 @@ """Refreshed the values of the controls, and also calls the wxPython Refresh to update the form. """ + self.Refresh() try: self.refreshControls() except dabo.ui.deadObjectException:
Modified: trunk/dabo/ui/uiwx/dPemMixin.py =================================================================== --- trunk/dabo/ui/uiwx/dPemMixin.py 2006-02-01 00:36:52 UTC (rev 1886) +++ trunk/dabo/ui/uiwx/dPemMixin.py 2006-02-01 02:09:28 UTC (rev 1887) @@ -189,10 +189,10 @@ if callable(attFunc): ret = attFunc() if ret is None: - ret = super(dPemMixin, self).__getattr__(att) + raise AttributeError, att return ret + - def __setattr__(self, att, val): isSet = False if att.startswith(_prefixDynamic): @@ -323,7 +323,10 @@ if isinstance(self, (wx.Frame, wx.Dialog)): self.bindEvent(dEvents.Refresh, self.__onRefresh) else: - self.Form.bindEvent(dEvents.Refresh, self.__onRefresh) + try: + self.Form.bindEvent(dEvents.Refresh, self.__onRefresh) + except AttributeError: + self.Parent.bindEvent(dEvents.Refresh, self.__onRefresh) self.initEvents() @@ -833,8 +836,13 @@ """Update any dynamic properties, and then call the refresh() hook. """ - self.__refreshDynamicProps() - self.refresh() + try: + self.__refreshDynamicProps() + self.refresh() + except dabo.ui.deadObjectException: + # This can happen if a form is released when there is a + # pending callAfter() refresh. + pass def __refreshDynamicProps(self): @@ -1215,7 +1223,7 @@ if self._constructed(): self._borderWidth = val if self._border: - if val == 0: + if val == 0 and (self._border in self._drawnObjects): self._drawnObjects.remove(self._border) else: self._border.PenWidth = val
©2006 Ed Leafe |