Changes to eliminate "WebKit Threading Violation" errors from the log; now use self.performSelectorOnMainThread_withObject_waitUntilDone_ to make sure the description is updated on the main thread.

git-svn-id: http://munki.googlecode.com/svn/trunk@602 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2010-07-23 17:39:46 +00:00
parent 60ba21297e
commit 9a47af9605
3 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.1</string>
<string>3.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>3.0.1</string>
<string>3.0.2</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
@@ -90,7 +90,7 @@ class MSUOptionalInstallsViewController(NSViewController):
self.window_controller.theTabView.selectPreviousTabViewItem_(sender)
NSApp.delegate().addOrRemoveOptionalSoftware()
def tableViewSelectionDidChange_(self, sender):
def updateDescriptionView(self):
if self.array_controller.selectedObjects():
row = self.array_controller.selectedObjects()[0]
description = row.get("description","")
@@ -103,3 +103,7 @@ class MSUOptionalInstallsViewController(NSViewController):
self.updateRowStatus()
else:
self.descriptionView.mainFrame().loadHTMLString_baseURL_(u"", None)
def tableViewSelectionDidChange_(self, sender):
self.performSelectorOnMainThread_withObject_waitUntilDone_(self.updateDescriptionView, None, NO)
@@ -61,7 +61,7 @@ class MSUupdatesViewController(NSViewController):
NSApp.delegate().optional_view_controller.AddRemoveBtn.setEnabled_(NO)
NSApp.delegate().buildOptionalInstallsData()
def tableViewSelectionDidChange_(self, sender):
def updateDescriptionView(self):
if self.array_controller.selectedObjects():
row = self.array_controller.selectedObjects()[0]
description = row.get("description","")
@@ -73,5 +73,8 @@ class MSUupdatesViewController(NSViewController):
u"text/plain", u"utf-8", None)
else:
self.descriptionView.mainFrame().loadHTMLString_baseURL_(u"", None)
def tableViewSelectionDidChange_(self, sender):
self.performSelectorOnMainThread_withObject_waitUntilDone_(self.updateDescriptionView, None, NO)