folderModel = objc.IBOutlet()
loadingSheet = objc.IBOutlet()
loadingLabel = objc.IBOutlet()
+ loadingIndicator = objc.IBOutlet()
def awakeFromNib(self):
self.runningGenerator = False
def runGenerator(self, func, finish):
assert not self.runningGenerator
self.runningGenerator = True
+ self.loadingIndicator.startAnimation_(self)
NSApp.beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_(self.loadingSheet, self.window, None, None, None)
arg = (func(), finish)
self.performSelectorInBackground_withObject_(self.runGeneratorThread, arg)
self.runningGenerator = False
NSApp.endSheet_(self.loadingSheet)
self.loadingSheet.orderOut_(self)
+ self.loadingIndicator.stopAnimation_(self)
finish()
@objc.IBAction