wanted to know开发者_JS百科 how to write a forward and back command in a superclass not sure but i gave it a try dont know if its right or wrong some help plz
def forward(self):
return (self.100)
def back(self):
return (self.50)
def forward(self):
self.position += self.distance
return (self.position)
def back(self):
self.position -= self.distance
return (self.position)
EDIT: I assumed you are doing something like progress bar of install app, where some operation advances progress (copying files), and if user cancels install others operation make rollback (deleting files). Try ask a proper question as other users comment.
精彩评论