Logo Search packages:      
Sourcecode: quickly-widgets version File versions  Download package

def widgets::asynch_task_progressbox::AsynchTaskProgressBox::start (   self,
  caption = "Working" 
)

executes run_function asynchronously and starts pulsating the progressbar
Keyword arguments:
caption -- optional text to display in the progressbar

Definition at line 69 of file asynch_task_progressbox.py.

00069                                      :
  """executes run_function asynchronously and starts pulsating the progressbar
  Keyword arguments:
  caption -- optional text to display in the progressbar
  """
  #Throw an exception if the user tries to start an operating thread
  if self.pulse_thread != None:
   raise RuntimeError("AsynchTaskProgressBox already started.")

  #Create and start a thread to run the users task
  #pass in a callback and the user's params
  self.work_thread = KillableThread(self.run_function, self.__on_complete, self.params)
  self.work_thread.start()
  
  #create a thread to display the user feedback
  self.pulse_thread = PulseThread(self.progressbar, caption)
  self.pulse_thread.start()

  #enable the button so the user can try to kill the task
  self.cancel_button.set_sensitive( True )
  
 #call back function for after run_function returns
 def __on_complete( self, data ):


Generated by  Doxygen 1.6.0   Back to index