Mailing list archives: January 2007

Site index · List index
Message listThread · Author · Date
ja...@wordzoo.com n class="cx"> if timeInfo: if self.logger: self.logger.Stop() else: </span><span class="lines">@@ -1412,7 +1412,7 @@ </span><span class="cx"> # Have to do it the hard way since Account Preferences is modal by default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1515,7 +1515,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1532,7 +1532,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1669,7 +1669,7 @@ </span><span class="cx"> if self.logger: self.logger.Start("Switch to %s%s" % (viewName, id)) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() self.CheckView() </span><span class="lines">@@ -1766,11 +1766,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Start("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestCertstoreViewpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestCertstoreView.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -23,7 +23,7 @@ </span><span class="cx"> # Make sure we start with the calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # 1. Add certstore to sidebar self.app_ns.root.addCertificateToSidebarEvent() </span><span class="lines">@@ -122,7 +122,7 @@ </span><span class="cx"> # Switch back to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Add certstore to sidebar again self.app_ns.root.addCertificateToSidebarEvent() # force sidebar to update </span><span class="lines">@@ -137,7 +137,7 @@ </span><span class="cx"> # Switch to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # XXX 8. import certificate # confirm that we switched to all view, and the newly added cert is # selected in summary view and displayed correctly in detail view </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestImportOverwritepy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestImportOverwrite.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -55,7 +55,7 @@ </span><span class="cx"> #collection.add(tmpEvent) collection.add(event.item) sharing.exportFile(appView, fullpath, collection) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Exported event") #change the event after exporting </span><span class="lines">@@ -64,7 +64,7 @@ </span><span class="cx"> #import the original event sharing.importFile(appView, fullpath) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Imported exported event") #check if changed attributes have reverted to original values </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestMoveToTrashpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestMoveToTrash.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -30,9 +30,8 @@ </span><span class="cx"> note.SetAttr(displayName=uw("A note to move to Trash"), body=uw("TO MOVE TO TRASH")) # Work around nasty bug in QAUITestAppLib caused by not propagating notificatons correctly </span><span class="rem">- application = wx.GetApp() - application.propagateAsynchronousNotifications() - application.Yield() </span><span class="add">+ wx.GetApp().propagateAsynchronousNotifications() + wx.SafeYield(None, True) </span><span class="cx"> note.MoveToTrash() # verification </span></pre></div> <a id="trunkchandlertoolscatsframeworkChandlerTestLibpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/framework/ChandlerTestLib.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -120,13 +120,11 @@ </span><span class="cx"> account=account) #Share button call </span><span class="rem">- app = wx.GetApp() - </span><span class="cx"> # We are interested in seeing how quickly we can upload the collection testClass.logger.startAction('Publish') win.PublishCollection() while not win.done: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if not win.success: testClass.logger.endAction(False, "(On publish collection)") </span><span class="lines">@@ -151,7 +149,7 @@ </span><span class="cx"> #Done button call win.OnPublishDone(None) </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Unsubscribe and delete the (local) collection we just published so # that we can subscribe to it below. </span><span class="lines">@@ -180,7 +178,7 @@ </span><span class="cx"> win.OnSubscribe(None) try: while win.subscribing: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> except wx.PyDeadObjectError: # XXX The C++ part of the dialog was gone, so we are no longer # XXX supposed to touch any attributes of the dialog. In our </span><span class="lines">@@ -788,7 +786,7 @@ </span><span class="cx"> self.logger.report(True, name="Focus set in Detail View") else: self.logger.report(False, name="Focus set in Detail View", comment="Detail View had no focusable blocks") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) def SetTimeZone(self, timeZone, timeInfo=True): </span><span class="lines">@@ -859,7 +857,7 @@ </span><span class="cx"> if timeInfo: self.logger.startAction("Sending the message") App_ns.appbar.press("ApplicationBarSendButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> #checkings sent = None </span><span class="lines">@@ -872,7 +870,7 @@ </span><span class="cx"> mailMessage = pim.mail.MailStamp(self.item) # wait for mail delivery while not sent: </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> sent = mailMessage.isSent() if timeInfo: self.logger.endAction(True) </span><span class="lines">@@ -935,7 +933,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Delete() # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -959,7 +957,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Remove({'testing' : True}) # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -1444,7 +1442,7 @@ </span><span class="cx"> # Have to do it the hard way since Account Preferences is modal by default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1547,7 +1545,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1564,7 +1562,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1697,7 +1695,7 @@ </span><span class="cx"> self.logger.startAction("Switch to %s" % viewName) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) self.CheckView() </span><span class="lines">@@ -1793,11 +1791,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.startAction("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span> </pre> </div> </div> </body> </html> = os.path.join(Globals.chandlerDirectory, + self.PARCEL_IMPORT.replace ('.', os.sep)) sys.path.insert (1, parcelDir) if __debug__: """ In the debugging version, if PARCELDIR env var is set, put that - directory into sys.path because zodb might be loading objects - based on modules in that directory. This must be done prior to - loading the system parcels + directory into sys.path before any modules are imported. """ debugParcelDir = None if os.environ.has_key('PARCELDIR'): @@ -237,123 +124,155 @@ """ Open the repository. - -create argument forces a new repository. - -recover argument runs recovery when opening after a crash. - Load the Repository after the path has been altered, but before - the parcels are loaded. - """ - repositoryPath = os.path.join(self.chandlerDirectory, "__repository__") - self.repository = XMLRepository(repositoryPath) + -create argument forces a new repository. + -recover argument runs recovery when opening after a crash. + Load the Repository after the path has been altered, but before + the parcels are loaded. + """ + repositoryPath = os.path.join(Globals.chandlerDirectory, + "__repository__") + Globals.repository = XMLRepository(repositoryPath) - if '-create' in self.argv: - self.repository.create() + if '-create' in sys.argv: + Globals.repository.create() else: - self.repository.open(create=True, recover='-recover' in self.argv) + Globals.repository.open(create=True, recover='-recover' in sys.argv) - # Load the repository foundations - # @@@ This repository loading code should not be embedded in the - # application. - if not self.repository.find('//Schema'): + if not Globals.repository.find('//Schema'): """ Bootstrap an empty repository by loading only the stuff that - can't be loaded in a data parcel. + can't be loaded in a data parcel. """ - self.repository.loadPack(os.path.join(self.chandlerDirectory, - "repository", - "packs", - "schema.pack")) + Globals.repository.loadPack(os.path.join(Globals.chandlerDirectory, + "repository", + "packs", + "schema.pack")) - # set the new global repository - Globals.repository = self.repository - - AutoItem.SetRepository (app.repository) #AutoItem needs to know the repository - self.model = self.repository.find('//Application') - if not self.model: - self.model = Application(name='Application', parent=self.repository) - - """ - The model persists, so it can't store a reference to self, which - is a wxApp object. We use the association to keep track of the - wxPython object associated with each persistent object. - """ - self.association={id(self.model) : self} - - # Load individual data par Thu, 24 Apr, 14:24
ja...@wordzoo.com y default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1515,7 +1515,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1532,7 +1532,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1669,7 +1669,7 @@ </span><span class="cx"> if self.logger: self.logger.Start("Switch to %s%s" % (viewName, id)) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() self.CheckView() </span><span class="lines">@@ -1766,11 +1766,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Start("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestCertstoreViewpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestCertstoreView.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -23,7 +23,7 @@ </span><span class="cx"> # Make sure we start with the calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # 1. Add certstore to sidebar self.app_ns.root.addCertificateToSidebarEvent() </span><span class="lines">@@ -122,7 +122,7 @@ </span><span class="cx"> # Switch back to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Add certstore to sidebar again self.app_ns.root.addCertificateToSidebarEvent() # force sidebar to update </span><span class="lines">@@ -137,7 +137,7 @@ </span><span class="cx"> # Switch to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # XXX 8. import certificate # confirm that we switched to all view, and the newly added cert is # selected in summary view and displayed correctly in detail view </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestImportOverwritepy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestImportOverwrite.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -55,7 +55,7 @@ </span><span class="cx"> #collection.add(tmpEvent) collection.add(event.item) sharing.exportFile(appView, fullpath, collection) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Exported event") #change the event after exporting </span><span class="lines">@@ -64,7 +64,7 @@ </span><span class="cx"> #import the original event sharing.importFile(appView, fullpath) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Imported exported event") #check if changed attributes have reverted to original values </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestMoveToTrashpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestMoveToTrash.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -30,9 +30,8 @@ </span><span class="cx"> note.SetAttr(displayName=uw("A note to move to Trash"), body=uw("TO MOVE TO TRASH")) # Work around nasty bug in QAUITestAppLib caused by not propagating notificatons correctly </span><span class="rem">- application = wx.GetApp() - application.propagateAsynchronousNotifications() - application.Yield() </span><span class="add">+ wx.GetApp().propagateAsynchronousNotifications() + wx.SafeYield(None, True) </span><span class="cx"> note.MoveToTrash() # verification </span></pre></div> <a id="trunkchandlertoolscatsframeworkChandlerTestLibpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/framework/ChandlerTestLib.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -120,13 +120,11 @@ </span><span class="cx"> account=account) #Share button call </span><span class="rem">- app = wx.GetApp() - </span><span class="cx"> # We are interested in seeing how quickly we can upload the collection testClass.logger.startAction('Publish') win.PublishCollection() while not win.done: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if not win.success: testClass.logger.endAction(False, "(On publish collection)") </span><span class="lines">@@ -151,7 +149,7 @@ </span><span class="cx"> #Done button call win.OnPublishDone(None) </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Unsubscribe and delete the (local) collection we just published so # that we can subscribe to it below. </span><span class="lines">@@ -180,7 +178,7 @@ </span><span class="cx"> win.OnSubscribe(None) try: while win.subscribing: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> except wx.PyDeadObjectError: # XXX The C++ part of the dialog was gone, so we are no longer # XXX supposed to touch any attributes of the dialog. In our </span><span class="lines">@@ -788,7 +786,7 @@ </span><span class="cx"> self.logger.report(True, name="Focus set in Detail View") else: self.logger.report(False, name="Focus set in Detail View", comment="Detail View had no focusable blocks") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) def SetTimeZone(self, timeZone, timeInfo=True): </span><span class="lines">@@ -859,7 +857,7 @@ </span><span class="cx"> if timeInfo: self.logger.startAction("Sending the message") App_ns.appbar.press("ApplicationBarSendButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> #checkings sent = None </span><span class="lines">@@ -872,7 +870,7 @@ </span><span class="cx"> mailMessage = pim.mail.MailStamp(self.item) # wait for mail delivery while not sent: </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> sent = mailMessage.isSent() if timeInfo: self.logger.endAction(True) </span><span class="lines">@@ -935,7 +933,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Delete() # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -959,7 +957,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Remove({'testing' : True}) # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -1444,7 +1442,7 @@ </span><span class="cx"> # Have to do it the hard way since Account Preferences is modal by default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1547,7 +1545,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1564,7 +1562,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1697,7 +1695,7 @@ </span><span class="cx"> self.logger.startAction("Switch to %s" % viewName) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) self.CheckView() </span><span class="lines">@@ -1793,11 +1791,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.startAction("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span> </pre> </div> </div> </body> </html> = os.path.join(Globals.chandlerDirectory, + self.PARCEL_IMPORT.replace ('.', os.sep)) sys.path.insert (1, parcelDir) if __debug__: """ In the debugging version, if PARCELDIR env var is set, put that - directory into sys.path because zodb might be loading objects - based on modules in that directory. This must be done prior to - loading the system parcels + directory into sys.path before any modules are imported. """ debugParcelDir = None if os.environ.has_key('PARCELDIR'): @@ -237,123 +124,155 @@ """ Open the repository. - -create argument forces a new repository. - -recover argument runs recovery when opening after a crash. - Load the Repository after the path has been altered, but before - the parcels are loaded. - """ - repositoryPath = os.path.join(self.chandlerDirectory, "__repository__") - self.repository = XMLRepository(repositoryPath) + -create argument forces a new repository. + -recover argument runs recovery when opening after a crash. + Load the Repository after the path has been altered, but before + the parcels are loaded. + """ + repositoryPath = os.path.join(Globals.chandlerDirectory, + "__repository__") + Globals.repository = XMLRepository(repositoryPath) - if '-create' in self.argv: - self.repository.create() + if '-create' in sys.argv: + Globals.repository.create() else: - self.repository.open(create=True, recover='-recover' in self.argv) + Globals.repository.open(create=True, recover='-recover' in sys.argv) - # Load the repository foundations - # @@@ This repository loading code should not be embedded in the - # application. - if not self.repository.find('//Schema'): + if not Globals.repository.find('//Schema'): """ Bootstrap an empty repository by loading only the stuff that - can't be loaded in a data parcel. + can't be loaded in a data parcel. """ - self.repository.loadPack(os.path.join(self.chandlerDirectory, - "repository", - "packs", - "schema.pack")) + Globals.repository.loadPack(os.path.join(Globals.chandlerDirectory, + "repository", + "packs", + "schema.pack")) - # set the new global repository - Globals.repository = self.repository - - AutoItem.SetRepository (app.repository) #AutoItem needs to know the repository - self.model = self.repository.find('//Application') - if not self.model: - self.model = Application(name='Application', parent=self.repository) - - """ - The model persists, so it can't store a reference to self, which - is a wxApp object. We use the association to keep track of the - wxPython object associated with each persistent object. - """ - self.association={id(self.model) : self} - - # Load individual data par Thu, 24 Apr, 14:24
ja...@wordzoo.com y default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1515,7 +1515,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1532,7 +1532,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1669,7 +1669,7 @@ </span><span class="cx"> if self.logger: self.logger.Start("Switch to %s%s" % (viewName, id)) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() self.CheckView() </span><span class="lines">@@ -1766,11 +1766,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Start("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestCertstoreViewpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestCertstoreView.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -23,7 +23,7 @@ </span><span class="cx"> # Make sure we start with the calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # 1. Add certstore to sidebar self.app_ns.root.addCertificateToSidebarEvent() </span><span class="lines">@@ -122,7 +122,7 @@ </span><span class="cx"> # Switch back to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Add certstore to sidebar again self.app_ns.root.addCertificateToSidebarEvent() # force sidebar to update </span><span class="lines">@@ -137,7 +137,7 @@ </span><span class="cx"> # Switch to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # XXX 8. import certificate # confirm that we switched to all view, and the newly added cert is # selected in summary view and displayed correctly in detail view </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestImportOverwritepy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestImportOverwrite.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -55,7 +55,7 @@ </span><span class="cx"> #collection.add(tmpEvent) collection.add(event.item) sharing.exportFile(appView, fullpath, collection) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Exported event") #change the event after exporting </span><span class="lines">@@ -64,7 +64,7 @@ </span><span class="cx"> #import the original event sharing.importFile(appView, fullpath) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Imported exported event") #check if changed attributes have reverted to original values </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestMoveToTrashpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestMoveToTrash.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -30,9 +30,8 @@ </span><span class="cx"> note.SetAttr(displayName=uw("A note to move to Trash"), body=uw("TO MOVE TO TRASH")) # Work around nasty bug in QAUITestAppLib caused by not propagating notificatons correctly </span><span class="rem">- application = wx.GetApp() - application.propagateAsynchronousNotifications() - application.Yield() </span><span class="add">+ wx.GetApp().propagateAsynchronousNotifications() + wx.SafeYield(None, True) </span><span class="cx"> note.MoveToTrash() # verification </span></pre></div> <a id="trunkchandlertoolscatsframeworkChandlerTestLibpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/framework/ChandlerTestLib.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -120,13 +120,11 @@ </span><span class="cx"> account=account) #Share button call </span><span class="rem">- app = wx.GetApp() - </span><span class="cx"> # We are interested in seeing how quickly we can upload the collection testClass.logger.startAction('Publish') win.PublishCollection() while not win.done: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if not win.success: testClass.logger.endAction(False, "(On publish collection)") </span><span class="lines">@@ -151,7 +149,7 @@ </span><span class="cx"> #Done button call win.OnPublishDone(None) </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Unsubscribe and delete the (local) collection we just published so # that we can subscribe to it below. </span><span class="lines">@@ -180,7 +178,7 @@ </span><span class="cx"> win.OnSubscribe(None) try: while win.subscribing: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> except wx.PyDeadObjectError: # XXX The C++ part of the dialog was gone, so we are no longer # XXX supposed to touch any attributes of the dialog. In our </span><span class="lines">@@ -788,7 +786,7 @@ </span><span class="cx"> self.logger.report(True, name="Focus set in Detail View") else: self.logger.report(False, name="Focus set in Detail View", comment="Detail View had no focusable blocks") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) def SetTimeZone(self, timeZone, timeInfo=True): </span><span class="lines">@@ -859,7 +857,7 @@ </span><span class="cx"> if timeInfo: self.logger.startAction("Sending the message") App_ns.appbar.press("ApplicationBarSendButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> #checkings sent = None </span><span class="lines">@@ -872,7 +870,7 @@ </span><span class="cx"> mailMessage = pim.mail.MailStamp(self.item) # wait for mail delivery while not sent: </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> sent = mailMessage.isSent() if timeInfo: self.logger.endAction(True) </span><span class="lines">@@ -935,7 +933,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Delete() # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -959,7 +957,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Remove({'testing' : True}) # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -1444,7 +1442,7 @@ </span><span class="cx"> # Have to do it the hard way since Account Preferences is modal by default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1547,7 +1545,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1564,7 +1562,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1697,7 +1695,7 @@ </span><span class="cx"> self.logger.startAction("Switch to %s" % viewName) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) self.CheckView() </span><span class="lines">@@ -1793,11 +1791,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.startAction("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span> </pre> </div> </div> </body> </html> = os.path.join(Globals.chandlerDirectory, + self.PARCEL_IMPORT.replace ('.', os.sep)) sys.path.insert (1, parcelDir) if __debug__: """ In the debugging version, if PARCELDIR env var is set, put that - directory into sys.path because zodb might be loading objects - based on modules in that directory. This must be done prior to - loading the system parcels + directory into sys.path before any modules are imported. """ debugParcelDir = None if os.environ.has_key('PARCELDIR'): @@ -237,123 +124,155 @@ """ Open the repository. - -create argument forces a new repository. - -recover argument runs recovery when opening after a crash. - Load the Repository after the path has been altered, but before - the parcels are loaded. - """ - repositoryPath = os.path.join(self.chandlerDirectory, "__repository__") - self.repository = XMLRepository(repositoryPath) + -create argument forces a new repository. + -recover argument runs recovery when opening after a crash. + Load the Repository after the path has been altered, but before + the parcels are loaded. + """ + repositoryPath = os.path.join(Globals.chandlerDirectory, + "__repository__") + Globals.repository = XMLRepository(repositoryPath) - if '-create' in self.argv: - self.repository.create() + if '-create' in sys.argv: + Globals.repository.create() else: - self.repository.open(create=True, recover='-recover' in self.argv) + Globals.repository.open(create=True, recover='-recover' in sys.argv) - # Load the repository foundations - # @@@ This repository loading code should not be embedded in the - # application. - if not self.repository.find('//Schema'): + if not Globals.repository.find('//Schema'): """ Bootstrap an empty repository by loading only the stuff that - can't be loaded in a data parcel. + can't be loaded in a data parcel. """ - self.repository.loadPack(os.path.join(self.chandlerDirectory, - "repository", - "packs", - "schema.pack")) + Globals.repository.loadPack(os.path.join(Globals.chandlerDirectory, + "repository", + "packs", + "schema.pack")) - # set the new global repository - Globals.repository = self.repository - - AutoItem.SetRepository (app.repository) #AutoItem needs to know the repository - self.model = self.repository.find('//Application') - if not self.model: - self.model = Application(name='Application', parent=self.repository) - - """ - The model persists, so it can't store a reference to self, which - is a wxApp object. We use the association to keep track of the - wxPython object associated with each persistent object. - """ - self.association={id(self.model) : self} - - # Load individual data par Thu, 24 Apr, 14:24
ja...@wordzoo.com y default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1515,7 +1515,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1532,7 +1532,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1669,7 +1669,7 @@ </span><span class="cx"> if self.logger: self.logger.Start("Switch to %s%s" % (viewName, id)) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() self.CheckView() </span><span class="lines">@@ -1766,11 +1766,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Start("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestCertstoreViewpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestCertstoreView.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -23,7 +23,7 @@ </span><span class="cx"> # Make sure we start with the calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # 1. Add certstore to sidebar self.app_ns.root.addCertificateToSidebarEvent() </span><span class="lines">@@ -122,7 +122,7 @@ </span><span class="cx"> # Switch back to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Add certstore to sidebar again self.app_ns.root.addCertificateToSidebarEvent() # force sidebar to update </span><span class="lines">@@ -137,7 +137,7 @@ </span><span class="cx"> # Switch to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # XXX 8. import certificate # confirm that we switched to all view, and the newly added cert is # selected in summary view and displayed correctly in detail view </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestImportOverwritepy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestImportOverwrite.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -55,7 +55,7 @@ </span><span class="cx"> #collection.add(tmpEvent) collection.add(event.item) sharing.exportFile(appView, fullpath, collection) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Exported event") #change the event after exporting </span><span class="lines">@@ -64,7 +64,7 @@ </span><span class="cx"> #import the original event sharing.importFile(appView, fullpath) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Imported exported event") #check if changed attributes have reverted to original values </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestMoveToTrashpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestMoveToTrash.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -30,9 +30,8 @@ </span><span class="cx"> note.SetAttr(displayName=uw("A note to move to Trash"), body=uw("TO MOVE TO TRASH")) # Work around nasty bug in QAUITestAppLib caused by not propagating notificatons correctly </span><span class="rem">- application = wx.GetApp() - application.propagateAsynchronousNotifications() - application.Yield() </span><span class="add">+ wx.GetApp().propagateAsynchronousNotifications() + wx.SafeYield(None, True) </span><span class="cx"> note.MoveToTrash() # verification </span></pre></div> <a id="trunkchandlertoolscatsframeworkChandlerTestLibpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/framework/ChandlerTestLib.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -120,13 +120,11 @@ </span><span class="cx"> account=account) #Share button call </span><span class="rem">- app = wx.GetApp() - </span><span class="cx"> # We are interested in seeing how quickly we can upload the collection testClass.logger.startAction('Publish') win.PublishCollection() while not win.done: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if not win.success: testClass.logger.endAction(False, "(On publish collection)") </span><span class="lines">@@ -151,7 +149,7 @@ </span><span class="cx"> #Done button call win.OnPublishDone(None) </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Unsubscribe and delete the (local) collection we just published so # that we can subscribe to it below. </span><span class="lines">@@ -180,7 +178,7 @@ </span><span class="cx"> win.OnSubscribe(None) try: while win.subscribing: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> except wx.PyDeadObjectError: # XXX The C++ part of the dialog was gone, so we are no longer # XXX supposed to touch any attributes of the dialog. In our </span><span class="lines">@@ -788,7 +786,7 @@ </span><span class="cx"> self.logger.report(True, name="Focus set in Detail View") else: self.logger.report(False, name="Focus set in Detail View", comment="Detail View had no focusable blocks") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) def SetTimeZone(self, timeZone, timeInfo=True): </span><span class="lines">@@ -859,7 +857,7 @@ </span><span class="cx"> if timeInfo: self.logger.startAction("Sending the message") App_ns.appbar.press("ApplicationBarSendButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> #checkings sent = None </span><span class="lines">@@ -872,7 +870,7 @@ </span><span class="cx"> mailMessage = pim.mail.MailStamp(self.item) # wait for mail delivery while not sent: </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> sent = mailMessage.isSent() if timeInfo: self.logger.endAction(True) </span><span class="lines">@@ -935,7 +933,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Delete() # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -959,7 +957,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Remove({'testing' : True}) # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -1444,7 +1442,7 @@ </span><span class="cx"> # Have to do it the hard way since Account Preferences is modal by default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1547,7 +1545,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1564,7 +1562,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1697,7 +1695,7 @@ </span><span class="cx"> self.logger.startAction("Switch to %s" % viewName) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) self.CheckView() </span><span class="lines">@@ -1793,11 +1791,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.startAction("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span> </pre> </div> </div> </body> </html> = os.path.join(Globals.chandlerDirectory, + self.PARCEL_IMPORT.replace ('.', os.sep)) sys.path.insert (1, parcelDir) if __debug__: """ In the debugging version, if PARCELDIR env var is set, put that - directory into sys.path because zodb might be loading objects - based on modules in that directory. This must be done prior to - loading the system parcels + directory into sys.path before any modules are imported. """ debugParcelDir = None if os.environ.has_key('PARCELDIR'): @@ -237,123 +124,155 @@ """ Open the repository. - -create argument forces a new repository. - -recover argument runs recovery when opening after a crash. - Load the Repository after the path has been altered, but before - the parcels are loaded. - """ - repositoryPath = os.path.join(self.chandlerDirectory, "__repository__") - self.repository = XMLRepository(repositoryPath) + -create argument forces a new repository. + -recover argument runs recovery when opening after a crash. + Load the Repository after the path has been altered, but before + the parcels are loaded. + """ + repositoryPath = os.path.join(Globals.chandlerDirectory, + "__repository__") + Globals.repository = XMLRepository(repositoryPath) - if '-create' in self.argv: - self.repository.create() + if '-create' in sys.argv: + Globals.repository.create() else: - self.repository.open(create=True, recover='-recover' in self.argv) + Globals.repository.open(create=True, recover='-recover' in sys.argv) - # Load the repository foundations - # @@@ This repository loading code should not be embedded in the - # application. - if not self.repository.find('//Schema'): + if not Globals.repository.find('//Schema'): """ Bootstrap an empty repository by loading only the stuff that - can't be loaded in a data parcel. + can't be loaded in a data parcel. """ - self.repository.loadPack(os.path.join(self.chandlerDirectory, - "repository", - "packs", - "schema.pack")) + Globals.repository.loadPack(os.path.join(Globals.chandlerDirectory, + "repository", + "packs", + "schema.pack")) - # set the new global repository - Globals.repository = self.repository - - AutoItem.SetRepository (app.repository) #AutoItem needs to know the repository - self.model = self.repository.find('//Application') - if not self.model: - self.model = Application(name='Application', parent=self.repository) - - """ - The model persists, so it can't store a reference to self, which - is a wxApp object. We use the association to keep track of the - wxPython object associated with each persistent object. - """ - self.association={id(self.model) : self} - - # Load individual data par Thu, 24 Apr, 14:24
ja...@wordzoo.com y default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1515,7 +1515,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1532,7 +1532,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1669,7 +1669,7 @@ </span><span class="cx"> if self.logger: self.logger.Start("Switch to %s%s" % (viewName, id)) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() self.CheckView() </span><span class="lines">@@ -1766,11 +1766,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Start("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestCertstoreViewpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestCertstoreView.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -23,7 +23,7 @@ </span><span class="cx"> # Make sure we start with the calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # 1. Add certstore to sidebar self.app_ns.root.addCertificateToSidebarEvent() </span><span class="lines">@@ -122,7 +122,7 @@ </span><span class="cx"> # Switch back to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Add certstore to sidebar again self.app_ns.root.addCertificateToSidebarEvent() # force sidebar to update </span><span class="lines">@@ -137,7 +137,7 @@ </span><span class="cx"> # Switch to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # XXX 8. import certificate # confirm that we switched to all view, and the newly added cert is # selected in summary view and displayed correctly in detail view </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestImportOverwritepy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestImportOverwrite.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -55,7 +55,7 @@ </span><span class="cx"> #collection.add(tmpEvent) collection.add(event.item) sharing.exportFile(appView, fullpath, collection) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Exported event") #change the event after exporting </span><span class="lines">@@ -64,7 +64,7 @@ </span><span class="cx"> #import the original event sharing.importFile(appView, fullpath) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Imported exported event") #check if changed attributes have reverted to original values </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestMoveToTrashpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestMoveToTrash.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -30,9 +30,8 @@ </span><span class="cx"> note.SetAttr(displayName=uw("A note to move to Trash"), body=uw("TO MOVE TO TRASH")) # Work around nasty bug in QAUITestAppLib caused by not propagating notificatons correctly </span><span class="rem">- application = wx.GetApp() - application.propagateAsynchronousNotifications() - application.Yield() </span><span class="add">+ wx.GetApp().propagateAsynchronousNotifications() + wx.SafeYield(None, True) </span><span class="cx"> note.MoveToTrash() # verification </span></pre></div> <a id="trunkchandlertoolscatsframeworkChandlerTestLibpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/framework/ChandlerTestLib.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -120,13 +120,11 @@ </span><span class="cx"> account=account) #Share button call </span><span class="rem">- app = wx.GetApp() - </span><span class="cx"> # We are interested in seeing how quickly we can upload the collection testClass.logger.startAction('Publish') win.PublishCollection() while not win.done: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if not win.success: testClass.logger.endAction(False, "(On publish collection)") </span><span class="lines">@@ -151,7 +149,7 @@ </span><span class="cx"> #Done button call win.OnPublishDone(None) </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Unsubscribe and delete the (local) collection we just published so # that we can subscribe to it below. </span><span class="lines">@@ -180,7 +178,7 @@ </span><span class="cx"> win.OnSubscribe(None) try: while win.subscribing: </span><span class="rem">- app.Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> except wx.PyDeadObjectError: # XXX The C++ part of the dialog was gone, so we are no longer # XXX supposed to touch any attributes of the dialog. In our </span><span class="lines">@@ -788,7 +786,7 @@ </span><span class="cx"> self.logger.report(True, name="Focus set in Detail View") else: self.logger.report(False, name="Focus set in Detail View", comment="Detail View had no focusable blocks") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) def SetTimeZone(self, timeZone, timeInfo=True): </span><span class="lines">@@ -859,7 +857,7 @@ </span><span class="cx"> if timeInfo: self.logger.startAction("Sending the message") App_ns.appbar.press("ApplicationBarSendButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> #checkings sent = None </span><span class="lines">@@ -872,7 +870,7 @@ </span><span class="cx"> mailMessage = pim.mail.MailStamp(self.item) # wait for mail delivery while not sent: </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> sent = mailMessage.isSent() if timeInfo: self.logger.endAction(True) </span><span class="lines">@@ -935,7 +933,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Delete() # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -959,7 +957,7 @@ </span><span class="cx"> # Processing of the corresponding CPIA event App_ns.root.Remove({'testing' : True}) # give the Yield </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if timeInfo: self.logger.endAction(True) else: </span><span class="lines">@@ -1444,7 +1442,7 @@ </span><span class="cx"> # Have to do it the hard way since Account Preferences is modal by default import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1547,7 +1545,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.GetApp().Yield(True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1564,7 +1562,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1697,7 +1695,7 @@ </span><span class="cx"> self.logger.startAction("Switch to %s" % viewName) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) self.CheckView() </span><span class="lines">@@ -1793,11 +1791,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.startAction("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.endAction(True) #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span> </pre> </div> </div> </body> </html> = os.path.join(Globals.chandlerDirectory, + self.PARCEL_IMPORT.replace ('.', os.sep)) sys.path.insert (1, parcelDir) if __debug__: """ In the debugging version, if PARCELDIR env var is set, put that - directory into sys.path because zodb might be loading objects - based on modules in that directory. This must be done prior to - loading the system parcels + directory into sys.path before any modules are imported. """ debugParcelDir = None if os.environ.has_key('PARCELDIR'): @@ -237,123 +124,155 @@ """ Open the repository. - -create argument forces a new repository. - -recover argument runs recovery when opening after a crash. - Load the Repository after the path has been altered, but before - the parcels are loaded. - """ - repositoryPath = os.path.join(self.chandlerDirectory, "__repository__") - self.repository = XMLRepository(repositoryPath) + -create argument forces a new repository. + -recover argument runs recovery when opening after a crash. + Load the Repository after the path has been altered, but before + the parcels are loaded. + """ + repositoryPath = os.path.join(Globals.chandlerDirectory, + "__repository__") + Globals.repository = XMLRepository(repositoryPath) - if '-create' in self.argv: - self.repository.create() + if '-create' in sys.argv: + Globals.repository.create() else: - self.repository.open(create=True, recover='-recover' in self.argv) + Globals.repository.open(create=True, recover='-recover' in sys.argv) - # Load the repository foundations - # @@@ This repository loading code should not be embedded in the - # application. - if not self.repository.find('//Schema'): + if not Globals.repository.find('//Schema'): """ Bootstrap an empty repository by loading only the stuff that - can't be loaded in a data parcel. + can't be loaded in a data parcel. """ - self.repository.loadPack(os.path.join(self.chandlerDirectory, - "repository", - "packs", - "schema.pack")) + Globals.repository.loadPack(os.path.join(Globals.chandlerDirectory, + "repository", + "packs", + "schema.pack")) - # set the new global repository - Globals.repository = self.repository - - AutoItem.SetRepository (app.repository) #AutoItem needs to know the repository - self.model = self.repository.find('//Application') - if not self.model: - self.model = Application(name='Application', parent=self.repository) - - """ - The model persists, so it can't store a reference to self, which - is a wxApp object. We use the association to keep track of the - wxPython object associated with each persistent object. - """ - self.association={id(self.model) : self} - - # Load individual data par Thu, 24 Apr, 14:24
Parlante import application self.window = application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(rv=self.view, modal=False) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def Ok(self): """ </span><span class="lines">@@ -1515,7 +1515,7 @@ </span><span class="cx"> child = self._GetField(field) child.SetFocus() child.Clear() #work around : SelectAll() doesn't work on mac </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> scripting.User.emulate_typing(value) def ToggleValue(self, field, value): </span><span class="lines">@@ -1532,7 +1532,7 @@ </span><span class="cx"> event.SetEventObject(child) self.window.OnLinkedControl(event) self.window.OnExclusiveRadioButton(event) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> def SelectValue(self, field, value): """ </span><span class="lines">@@ -1669,7 +1669,7 @@ </span><span class="cx"> if self.logger: self.logger.Start("Switch to %s%s" % (viewName, id)) #process the corresponding event App_ns.appbar.press(button) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() self.CheckView() </span><span class="lines">@@ -1766,11 +1766,11 @@ </span><span class="cx"> click2.m_y = y click2.SetEventObject(self.timedCanvas.widget) self.timedCanvas.widget.ProcessEvent(click2) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Start("Double click in the calendar view") self.timedCanvas.widget.ProcessEvent(click) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> if self.logger: self.logger.Stop() #work around : SelectAll() doesn't work wx.Window.FindFocus().Clear() </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestCertstoreViewpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestCertstoreView.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestCertstoreView.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -23,7 +23,7 @@ </span><span class="cx"> # Make sure we start with the calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # 1. Add certstore to sidebar self.app_ns.root.addCertificateToSidebarEvent() </span><span class="lines">@@ -122,7 +122,7 @@ </span><span class="cx"> # Switch back to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # Add certstore to sidebar again self.app_ns.root.addCertificateToSidebarEvent() # force sidebar to update </span><span class="lines">@@ -137,7 +137,7 @@ </span><span class="cx"> # Switch to calendar view self.app_ns.appbar.press("ApplicationBarEventButton") </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> # XXX 8. import certificate # confirm that we switched to all view, and the newly added cert is # selected in summary view and displayed correctly in detail view </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestImportOverwritepy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestImportOverwrite.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestImportOverwrite.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -55,7 +55,7 @@ </span><span class="cx"> #collection.add(tmpEvent) collection.add(event.item) sharing.exportFile(appView, fullpath, collection) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Exported event") #change the event after exporting </span><span class="lines">@@ -64,7 +64,7 @@ </span><span class="cx"> #import the original event sharing.importFile(appView, fullpath) </span><span class="rem">- wx.GetApp().Yield() </span><span class="add">+ wx.SafeYield(None, True) </span><span class="cx"> self.logger.addComment("Imported exported event") #check if changed attributes have reverted to original values </span></pre></div> <a id="trunkchandlertoolscatsFunctionalTestMoveToTrashpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/Functional/TestMoveToTrash.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/Functional/TestMoveToTrash.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -30,9 +30,8 @@ </span><span class="cx"> note.SetAttr(displayName=uw("A note to move to Trash"), body=uw("TO MOVE TO TRASH")) # Work around nasty bug in QAUITestAppLib caused by not propagating notificatons correctly </span><span class="rem">- application = wx.GetApp() - application.propagateAsynchronousNotifications() - application.Yield() </span><span class="add">+ wx.GetApp().propagateAsynchronousNotifications() + wx.SafeYield(None, True) </span><span class="cx"> note.MoveToTrash() # verification </span></pre></div> <a id="trunkchandlertoolscatsframeworkChandlerTestLibpy"></a> <div class="modfile"><h4>Modified: trunk/chandler/tools/cats/framework/ChandlerTestLib.py (14659 => 14660)</h4> <pre class="diff"> <span class="info">--- trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 00:38:46 UTC (rev 14659) +++ trunk/chandler/tools/cats/framework/ChandlerTestLib.py 2007-06-12 02:50:57 UTC (rev 14660) &chandler/parcels/osaf/app/compact.py 2007-06-12 02:50:57 UTC (rev 14660) </span><span class="lines">@@ -95,7 +95,7 @@ </span><span class="cx">