| « Changelog 13/09/2009 | Changelog 10/09/2009 » |
uiNameSpace - The dark side...
I already wrote a blog entry about uiNameSpace.
I also mentioned this bug. Sadly it is still present, even in 59025.
What's the effect of the bug?
It occurred first when opening the RTE, not all controls where hidden.
...
The demo attached to the bug shows an example:
The user can open the dialogue via trigger, either by calling (not effected by the 3ms script-break), by spawning it (effected by the break) or spawning it with disableSerialization. When using the second trigger the effect on the image happens:

ArmA II just forgets that it is in uiNameSpace and continues in normal space. Luckily we can use disableSerialization.
The next 'bug' is more a failure, and more on the users side:
User side?
*err*, yes. The following is the reason why the "units weapon dialogue" wasn't working:
Code:
with uiNameSpace do { | |
ION_RTE_Ctrl = ION_RTE_Display displayCtrl ION_CREATEWEAPONUNIT_CATEGORY; | |
_weapon = _this select 4 select 0 select 2; | |
if (_this select 3 == ION_CREATEWEAPONUNIT_WEAPON) then { | |
if (lbCurSel ION_RTE_Ctrl == 1) then { | |
[_weapon, true] call ION_RTE_pCreateWeaponUnit_AddWeapon; | |
}; | |
}; | |
}; |
Looks OK? No, it isn't: I use non uiNameSpace global variables in uiNameSpace. ION_CREATEWEAPONUNIT_CATEGORY and ION_CREATEWEAPONUNIT_WEAPON are IDCs which will get replaced by a pre-compiler. The real issue is here:
Code:
[_weapon, true] call ION_RTE_pCreateWeaponUnit_AddWeapon; |
ION_RTE_pCreateWeaponUnit_AddWeapon is a function and a global variable and not in uiNameSpace. So it is a undefined variable and the script will terminate.
In theory those uninitialised variables should get reported by ArmA II. But I can't find anything about it in ArmA2.rpt. So I needed to check 153 files about those errors.
I hope this entry prevents some people from doing the same stupid error when converting dialogues to ArmA II.
Oh, and if you have a Dev-Heaven account: Feel free to vote for the bug:
http://dev-heaven.net/issues/show/2077
2 comments
How about making a separate bug report for that?