You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, if you update the Shutdown callin after init, e.g. when deferring your init until after another widget loads, widget removal fails. The widget selector will show the widgets name in yellow (as when you call widgetHandler:RemoveWidget(self) or when the widget errors out normally), however clicking on the widgets name will not fully disable it (turn it red) and errors will continue to be thrown.
functionwidget:GetInfo()
return {
name="Test Shutdown Error (Deferred Init)"
}
endlocalDeferredInitfunctionwidget:Update()
ifDeferredInitthenDeferredInit(widget)
DeferredInit=nilerror()
endendfunctionwidget:Initialize()
DeferredInit=function(widget)
functionwidget:Shutdown()
Spring.Echo("Deferred Init Shutdown")
error() -- if this error is not thrown, there is no issue with widget removalendwidgetHandler:UpdateCallIn("Shutdown")
endend
The text was updated successfully, but these errors were encountered:
Usually, if
widget:Shutdown()
errors, the widget is successfully removed and can be fully disabled.Example code:
However, if you update the Shutdown callin after init, e.g. when deferring your init until after another widget loads, widget removal fails. The widget selector will show the widgets name in yellow (as when you call
widgetHandler:RemoveWidget(self)
or when the widget errors out normally), however clicking on the widgets name will not fully disable it (turn it red) and errors will continue to be thrown.Error message:
[t=00:00:29.658501][f=-000001] Error: [LuaUI::RunCallInTraceback] error=2 (LUA_ERRRUN) callin=Update trace=[Internal Lua error: Call failure] [No traceback returned]
Example code:
The text was updated successfully, but these errors were encountered: