Example #1
0
    def add_select(self, the_li):
        if not the_li.find_parent(App) == self:
            raise ElementError('Child the_li is not a descendant of self')
        if not the_li.find_handler('on_select') == self.on_select:
            raise ElementError('could not find on_select handler for the_li')

        the_li.selector = HTMLTag('input', {'type': 'checkbox'})
        select_click = Event()
        select_click.add_observer(self, App.on_select)
        the_li.selector.click = select_click
Example #2
0
    def add_select(self, the_li):
        if not the_li.find_parent(App) == self:
            raise ElementError('Child the_li is not a descendant of self')
        if not the_li.find_handler('on_select') == self.on_select:
            raise ElementError('could not find on_select handler for the_li')

        the_li.selector = HTMLTag('input', { 'type': 'checkbox' } )
        select_click = Event()
        select_click.add_observer(self, App.on_select)
        the_li.selector.click = select_click
Example #3
0
 def create_add_press_event(self):
     add_press_event = Event()
     add_press_event.add_observer(self, TodosInput.on_add_press)
     add_press_event.add_argument(self._TodosEntry, 'value')
     return add_press_event
Example #4
0
 def create_input_keydown_event(self):
     input_keydown_event = Event()
     input_keydown_event.add_observer(self, TodosInput.on_input_keydown)
     input_keydown_event.add_argument(self._TodosEntry, 'value')
     return input_keydown_event
Example #5
0
 def _test_replace_event(self):
     self.login._loginButton.click.remove_observer(self, App.on_login)
     del self.login._loginButton.click
     self.login._loginButton.click = Event()
     self.login._loginButton.click.add_observer(self, App.colorize_valid)
Example #6
0
 def _test_event_out_of_order(self):
     login_event = Event(client_no_bubble=True)
     login_event.add_argument(self.login._username, 'value')
     self.login._loginButton.click = login_event
     login_event.add_observer(self, App.on_login)
     login_event.add_argument(self.login._password, 'value')
Example #7
0
 def login_button_show(self):
     self.test_login_button = LoginButton()
     on_focus = Event()
     on_focus.add_observer(self, App.on_focus)
     self.test_login_button.focus = on_focus
     self.test_login_button.set_focus()
Example #8
0
 def get_increment_event(self):
     increment_event = Event()
     increment_event.add_argument(self, 'currentValue')
     increment_event.add_argument(self, 'haveWork')
     increment_event.add_observer(self, IncrementWidget.on_increment)
     return increment_event
Example #9
0
 def _test_event_out_of_order(self):
     login_event = Event(client_no_bubble=True)
     login_event.add_argument(self.login._username, 'value')
     self.login._loginButton.click = login_event
     login_event.add_observer(self, App.on_login)
     login_event.add_argument(self.login._password, 'value')
Example #10
0
 def login_button_show(self):
     self.test_login_button = LoginButton()
     on_focus = Event()
     on_focus.add_observer(self, App.on_focus)
     self.test_login_button.focus = on_focus
     self.test_login_button.set_focus()