Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
When adding data to the user data (or any dictionary) it would help declutter BXML code and reduce duplication if the key for the dictionary entry could be specified directly on the object.
Proposal:
a) Use bxml:key as the attribute that specifies the key.
b) Use bxml:id if a key is not specified.
Example:
Instead of this:
<aDictLikeUserData>
<myKey>
<MyObject ... />
</myKey>
<aDictLikeUserData>
you can use:
<aDictLikeUserData>
<MyObject bxml:key="myKey" .../>
</aDictLikeUserData>
or as a backup if key is not defined by id is:
<aDictLikeUserData>
<MyObject bxml:id="myKeyAndId" ... />
</aDictLikeUserData>
I have a BXMLSerializer patch. It's about a dozen lines including braces.