Working with schemas in the Schema tab (Flash Professional only)

The Schema tab in the Component inspector lets you view and edit the schema for each data-related component in your application. The Schema tab lists the component's bindable properties, which are properties to which you can bind that commonly contain dynamic data. All components have properties, but by default, to reduce UI clutter, the Schema tab shows only properties that commonly contain dynamic data. (You can, however, bind to any property by either adding it to the Schema tab or using ActionScript code. For more information, see Working with bindings in the Bindings tab (Flash Professional only).)

The Schema tab also lists properties' data types, their internal structure, and various special attributes. The data binding engine needs this information for each component to handle your data correctly.

The following illustration shows the Schema tab for the XMLConnector component used in Creating a simple application. The top pane shows the bindable properties for the xmlConn instance, with the food:Array property selected, and the bottom pane shows the settings for the food:Array property.



A component's schema describes the structure and type of data but is independent of how the data is actually stored. For example, the results from a WebServiceConnector component or an XMLConnector component could have identical schemas, even though the web service results are stored as ActionScript data structures (objects, arrays, strings, Boolean values, and numbers), and the XMLConnector component results are stored as XML objects. When you use data binding to access fields within a component's schema, you use the same procedure regardless of how the data is stored.

A component identifies which of its properties are bindable. These bindable properties appear in the Schema panel as top-level schema items (component properties). A component property can have its own internal schema that defines additional schema fields that can be bound to other component properties within your application; for example, when you introspect a WSDL for a WebServiceConnector component. The WSDL definition describes the parameters and the results for a web service. The WebServiceConnector component contains two bindable properties (params and results). When the WebServiceConnector component introspects the WSDL, Flash automatically creates the schema for the params and results properties so it mirrors the schema defined within the WSDL.

There are several ways to define the schema for a component. Here are the most common ways:


Version 8

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00000762.html