View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004368 | Spring engine | Lua | public | 2014-04-27 10:28 | 2014-06-14 02:03 |
| Reporter | silentwings | Assigned To | jK | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 96.0.1+git | ||||
| Summary | 0004368: unused Script.LuaUI callins generate an error | ||||
| Description | This 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.) | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
This is still present in -435 |
|
|
use: if Script.LuaUI("MyFoobar") then Script.LuaUI.MyFoobar() end |
|
|
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! |
|
|
it works fine! |
|
|
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. |
|
|
| 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. |
|
|
Yes I see, thanks. This ticket can be closed. |
| 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 |