Ejemplo n.º 1
0
 def variable_name_handler(name, value):
     value = token_text(value)
     frame.set_attributes("variable_name", value=value)
     
     timer = frame.get_state_data("variable_name_timer")
     if (value != token_text(value, strict=True)):
         if timer != None:
             timer.cancel()
         timer = threading.Timer(1.0, variable_name_full_validation, kwargs={"value":value})
         timer.start()
     else:
         if timer != None:
             timer.cancel()
         timer = None
     frame.set_state_data("variable_name_timer", timer)
    def variable_name_handler(name, value):
        value = token_text(value)
        frame.set_attributes("variable_name", value=value)

        timer = frame.get_state_data("variable_name_timer")
        if (value != token_text(value, strict=True)):
            if timer != None:
                timer.cancel()
            timer = threading.Timer(1.0,
                                    variable_name_full_validation,
                                    kwargs={"value": value})
            timer.start()
        else:
            if timer != None:
                timer.cancel()
            timer = None
        frame.set_state_data("variable_name_timer", timer)
 def variable_name_full_validation(value):
     frame.set_attributes("variable_name",
                          value=token_text(value, strict=True))
     frame.set_state_data("variable_name_timer", None)
Ejemplo n.º 4
0
 def variable_name_full_validation(value):
     frame.set_attributes("variable_name", value=token_text(value, strict=True))
     frame.set_state_data("variable_name_timer", None)