【发布时间】:2013-06-14 04:52:58
【问题描述】:
class AlarmBox(Widget):
hour = ["12","1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"]
tensMin = ["0", "1", "2", "3", "4", "5"]
onesMin = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
day = ["AM", "PM"]
txt_inpt = ObjectProperty(None)
def print1(self):
self.txt_inpt.text("HI")
XXXXXXX
如何在对象中调用 print1?
我尝试在 XXXXXX 做事
- self.print1()
- self.print1(self)
- print1(self)
- primt1()
- c = AlarmBox()
- c.print1()
在java中你可以这样做:
this.print1() 或 print1() !
【问题讨论】:
-
您收到错误消息了吗?
标签: python class function methods