Karsten> But because the move_robot function is critical, i wanted to
    Karsten> have some security if the release event got lost.

It doesn't appear the Button widget exposes its pressed state via
properties.  I think you'll just have to assume the released signal is sent
and caught.  If there was you could recast move_robot as

    def move_robot(self):
        # do a little dance ...
        # make a little love ...
        # get down tonight!
        # get down tonight!
        if self.move_button.state_is_pressed():
            return False
        return True

(The "return True" was missing from the first version.  Without it, the
timer will be cancelled after the first call.  I was too intent on the "do a
little dance" comments I guess.)

Skip

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to