Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the current Falcon code, there the "new" generated code generates two arrays of values. One is called MXMLProperties which represents the attributes of the top-level tag in the MXML file, and the other is called MXMLDescriptor which represents all of the child tags.

...

Code Block
<Application width="100" height="200" >
   <layout><VerticalLayout gap="10" /></layout>
   <Button name="foo" width="10" color="red" backgroundColor="blue" click="someFunction()" />
   <Container name="bar" width="300" >
       <TextInput name="baz" width="400" />
   </Container>
</Application>

...

Code Block
[ 3, // number of properties
  "width",  // name of property
  true,     // simple scalar value
  100,      // value
  "height",  // name of property
  true,     // simple scalar value
  200,      // value
  "layout", // name of property
  false,
  [ VerticalLayout, 1, "gap", true, 10, 0, 0, 0, null],
  0,        // no styles
  0,        // no effects
  0        // no event handlers
]

The

...

MXMLDescriptor

...

should

...

be:

Code Block
[

...

code
 Button     // class for Button tag
  1,        // number of properties
  "name",  // name of property
  true,     // simple scalar value
  "foo",      // value
  2,         // number of styles
  "color",  // name of style
  true,     // simple scalar value
  "red',      // value
  "backgroundColor",  // name of style
  true,     // simple scalar value
  "blue',      // value
  0,        // no effects
  1,        // one event handler
  "click", // name of property
  generatedfunctionforeventhandler,  // the generated event handler
  null,    // no children
  Container     // class for Button tag
  1,        // number of properties
  "name",  // name of property
  true,     // simple scalar value
  "bar",      // value
  0,         // number of styles
  0,        // no effects
  0,        // no event handler
  [ TextInput, 2, "name", true, "baz", "width", true, "400", 0, 0, 0, null]
]