开发者

forward and back command

开发者 https://www.devze.com 2022-12-08 19:06 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消