View Issue Details

IDProjectCategoryView StatusLast Update
0004368Spring engineLuapublic2014-06-14 02:03
Reportersilentwings Assigned TojK  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version96.0.1+git 
Summary0004368: unused Script.LuaUI callins generate an error
DescriptionThis is a problem because a game can have Script.LuaUI callins that it doesn't use itself but are left there for a players local widgets to use, if they want too.

(E.g. BA has a Script.LuaUI.PlayerReadyStateChanged; BA doesn't use it itself but someone wishing to replace AdvPlList with their own custom player list would probably need to use it.)

TagsNo tags attached.
Attached Files
infolog.txt (Attachment missing)
Checked infolog.txt for Errors

Activities

silentwings

2014-05-13 13:41

reporter   ~0013075

This is still present in -435

jK

2014-05-13 22:02

developer   ~0013083

use:

if Script.LuaUI("MyFoobar") then
  Script.LuaUI.MyFoobar()
end

silentwings

2014-05-26 09:44

reporter   ~0013155

Last edited: 2014-05-28 01:06

As far as I can see, that doesn't work - what's needed to remove the warning message is something like http://imolarpg.dyndns.org/trac/balatest/browser/trunk/luaui/widgets/wg_dummy_scriptluaui.lua?rev=2511.

Another situation where these "error" messages can cause problems: BA broadcasts the camera position of each player through Script.LuaUI events, allowing players/specs to watch each other. Not everyone wants to activate the receiver widget (because the extra commands double the demo file size) but they will now recieve error spam to console/infolog if they turn off the receiver widget.

There are plenty of other examples too, even just within BA.

So, imo there are good reasons to sometimes make unattached Script.LuaUI calls (or explain otherwise?). Please stop these "error" messages, they are frequently not errors!

jK

2014-05-28 22:49

developer   ~0013162

it works fine!

silentwings

2014-05-28 23:18

reporter   ~0013163

Last edited: 2014-05-30 20:40

Then more info please (e.g. where you are putting that code).

To me it just looks as though you have misunderstood the problem, since what you've given looks like gadget code which sends a Script.Luaui call. The problem is when a gadget sends a Script.LuaUI call and there is no widget ready to recieve it and call some function in LuaUI land.

jK

2014-06-01 12:54

developer   ~0013175

| To me it just looks as though you have misunderstood the problem, since what you've given looks like gadget code which sends a Script.Luaui call.
| The problem is when a gadget sends a Script.LuaUI call and there is no widget ready to recieve it and call some function in LuaUI land.

No, I didn't misunderstood anything. And yes, the you have to change your GADGET, not any widget!
The Warning message is there to inform, that there is no widget receiving the Script.LuaUI call, indicating that the gadget sends stuff to LuaUI w/o checking if there is any receiver! To prevent bugs caused by such cases, I added the warning.
Cause gadgets have the ability to check if there is a LuaUI bound to it! And it is done with the code I posted above.

silentwings

2014-06-01 14:12

reporter   ~0013179

Last edited: 2014-06-01 14:14

Yes I see, thanks. This ticket can be closed.

Issue History

Date Modified Username Field Change
2014-04-27 10:28 silentwings New Issue
2014-04-27 10:30 silentwings File Added: infolog.txt
2014-05-13 13:41 silentwings Note Added: 0013075
2014-05-13 22:01 jK Status new => closed
2014-05-13 22:01 jK Assigned To => jK
2014-05-13 22:01 jK Resolution open => won't fix
2014-05-13 22:02 jK Status closed => feedback
2014-05-13 22:02 jK Resolution won't fix => reopened
2014-05-13 22:02 jK Note Added: 0013083
2014-05-13 22:02 jK Status feedback => closed
2014-05-13 22:02 jK Resolution reopened => won't fix
2014-05-26 09:44 silentwings Note Added: 0013155
2014-05-26 09:44 silentwings Status closed => feedback
2014-05-26 09:44 silentwings Resolution won't fix => reopened
2014-05-26 09:45 silentwings Note Edited: 0013155
2014-05-28 01:06 silentwings Note Edited: 0013155
2014-05-28 22:49 jK Note Added: 0013162
2014-05-28 23:18 silentwings Note Added: 0013163
2014-05-28 23:18 silentwings Status feedback => assigned
2014-05-30 20:40 silentwings Note Edited: 0013163
2014-05-30 20:40 silentwings Note Edited: 0013163
2014-06-01 12:54 jK Note Added: 0013175
2014-06-01 14:12 silentwings Note Added: 0013179
2014-06-01 14:14 silentwings Note Edited: 0013179
2014-06-14 02:03 abma Status assigned => closed
2014-06-14 02:03 abma Resolution reopened => no change required