Titanium JIRA Archive
Alloy (ALOY)

[ALOY-143] Allow all elements to have "require" attribute

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-08-18T20:44:18.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsXML
Labelsn/a
ReporterTony Lukasavage
AssigneeTony Lukasavage
Created2012-07-30T09:03:06.000+0000
Updated2014-06-22T13:23:09.000+0000

Description

Right now only the Widget and View elements can have a "require" attribute. It would be nice if all elements could have this attribute. That way we can make use of the element name to do additional code validation at compile time. For example:
<TabGroup>
    <View require="someTabView"/>
</TabGroup>
Right now we don't have a good way to verify that that element is in fact a Tab. We could inspect the view ahead of time, but that seems cumbersome and not readily apparent to the developer. If we instead allowed the element name to reflect the contained root element, it would be easy for developers to see what they are requiring, and we could make checks at compile time to confirm that it is valid:
<TabGroup>
    <Tab require="someTabView"/>
</TabGroup>

Comments

  1. Tony Lukasavage 2012-08-18

    require attribute no longer exists

JSON Source