【发布时间】:2011-11-05 12:52:42
【问题描述】:
我刚从 lua 开始,我有一些代码,来自一些故意错误的人。现在,对于以下代码,我遇到了不断出现此错误的障碍:
function SIM_Utils:ClickButton(app, buttonName)
page = app:getTopPage()
widgets = page:getWidgets(buttonName)
print (type(widgets))
print (widgets[1])
widgets[1]:click(true, 5000)--this yields "attempt to index field '?' (a nil value)"
widgets[1]:click(false,0)--this yields "attempt to index field '?' (a nil value)"
app:captureScreen()
end
这将导致:
table
WidgetCommon (09590790)
L.E.
运行 Alex 在此处发布的内容后,结果如下:
widgets=
table: 0A45CF28
1
WidgetCommon (09590790)
是表:0A...我正在寻找的答案?
L.E. 2:重新发布整个功能,因为这似乎是问题所在
【问题讨论】: