OpenClonk Bugtracker - OpenClonk
View Issue Details
0001430OpenClonkEngine - GUIpublic2015-10-19 08:452017-08-12 20:40
Assigned To 
PlatformOSOS Version
Product Version 
Target Version9.0Fixed in Version 
Summary0001430: Disallow creating a script GUI window from an object instead of a proplist
DescriptionCurrently it is possible to create an UI window from an object (because objects are also just proplists) and this is also well-used in the MenuStyle_ definitions.

While helpful in some cases (which was the reason for allowing it), it might be very error prone:
Objects may contain all global definitions (i.e. static variables) and all functions as properties. Thus it is probably possible that an extension package or scenario that defines some special static variable can break existing UIs or lead to extremely weird behavior.

Also, see related bug: it is easier to introduce other strange behavior when using objects as UI items (because the objects can contain local variables that point to other objects, etc.).

This will also speed up UI creation which now uses objects, because less properties will need to be checked.
TagsNo tags attached.
parent of 0001420closed Zapper Endless recursion when clicking goal HUD in Mine Rescue 
Attached Files

2015-12-25 22:40   
As this has no impact on actual gameplay and players can't notice it (it is just a little error-prone/slower from a developer's point of view), I'll target it to 8.0, because it needs some script changes that could potentially break some things.

Issue History
2015-10-19 08:45ZapperNew Issue
2015-10-19 08:45ZapperRelationship addedparent of 0001420
2015-10-26 13:14ClonkonautStatusnew => confirmed
2015-12-25 22:40ZapperNote Added: 0004390
2015-12-25 22:40ZapperTarget Version7.0 => 8.0
2017-08-12 20:40ZapperTarget Version8.0 => 9.0