From 76bfaa870e06eaed9a24df86bb17704afbdb62d7 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 20 Oct 2021 16:18:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=A8=A1=E5=9D=97=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E4=BE=9D=E8=B5=96TABLE=E6=89=A9=E5=B1=95=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/widget.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 7563f124..ee566729 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -656,15 +656,16 @@ local selector={ function selector:reset() self.ATV=0 local V,L=self.disp(),self.list - local i=TABLE.find(L,V) - if i then - self.select=i - self.selText=self.list[i] - else - self.select=0 - self.selText="" - MES.new('error',"Selector "..self.name.." dead, disp= "..tostring(V)) + for i=1,#L do + if L[i]==V then + self.select=i + self.selText=self.list[i] + return + end end + self.select=0 + self.selText="" + MES.new('error',"Selector "..self.name.." dead, disp= "..tostring(V)) end function selector:isAbove(x,y) return