使用fgui的注册事件的tolua接口,回调有可能没带self

function ShopView:DoInit()
self.quality = 1
    self.m_Btn_Close.onClick:Set(self.OnCloseView, self)
end

function ShopView:OnCloseView()
    log(self.quality)
    WindowManager.Instance():CloseWnd(ShopView)
end

上面的按钮重复关闭界面之后有可能self为nil
已邀请:

谷主

赞同来自:

只有调试才能知道为什么。

要回复问题请先登录注册