コード例 #1
0
 def checkProcess_(self, timer):
     if not comm_queue.empty():
         # We Get Signal, Take Off Every Zig - er, time to shut down this forked process
         # Clear the queue
         while not comm_queue.empty():
             ignore = comm_queue.get_nowait()
         NSApp.stop_(None)
         # After you stop the runloop, the app has to receive another event to determine the runloop stopped ...
         self.kickRunLoop()
コード例 #2
0
ファイル: backdrop.py プロジェクト: pmbuko/misc-scripts
 def checkProcess_(self, timer):
     if not comm_queue.empty():
         # We Get Signal, Take Off Every Zig - er, time to shut down this forked process
         # Clear the queue
         while not comm_queue.empty():
             ignore = comm_queue.get_nowait()
         NSApp.stop_(None)
         # After you stop the runloop, the app has to receive another event to determine the runloop stopped ...
         self.kickRunLoop()
コード例 #3
0
 def runAndStop_(self, timer):
     self.alert = NSAlert.alloc().init()
     self.alert.setAlertStyle_(NSInformationalAlertStyle)
     self.alert.setMessageText_(self.message)
     if self.buttons is None:
         self.alert.addButtonWithTitle_('OK')
     else:
         for x in self.buttons:
             self.alert.addButtonWithTitle_(x)
     NSApp.activateIgnoringOtherApps_(True)
     self.result_code = self.alert.runModal()
     NSApp.stop_(None)