tidev/alloy

Ensure we support various combinations of XML

jhaynie opened this issue · 2 comments

We will need to probably build out a system by which we can do various combinations of XML from View markup.

For example, in Ti, we have certain parent/child relationships to certain objects which need to be mapped so that its more helpful in XML.

Example is a map. Ideally, you would do something like:

<map>
  <annotation></annotation>
</map>

As a way to statically build a map with a single annotation.

Also, in the tableview, you have a similar scenario but with additional nesting possibilities:

<tableview>
  <tableviewrow>
    <imageview url="foo.png" />
  </tableviewrow>
</tableview>

Also, as in the map above, we need to also be smart about Ti builtins to make sure we auto-prefix the ns (Ti.Map vs. Ti.UI) in these cases.

Was just chatting about this this morning. We're going to identify some of the most common cases for this and start to design a way to map that parent/child relationship to appropriate code based on the the Titanium UI element type. Not unlike the way you handled the XML text field of Buttons and Labels.

There will be some api generation that does not map directly to the parent child nesting. I believe TabGroup falls into this category as well. We will identify the special cases and create clean markup to represent the case and create the mapping process that generates the code behind.