Specifications

237ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
useProxy="false"
result="myData=ArrayCollection(srv.lastResult.data.result)"
/>
<mx:LineChart id="chart" dataProvider="{myData}" showDataTips="true">
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="month"/>
</mx:horizontalAxis>
<mx:series>
<mx:LineSeries yField="apple" name="Apple"/>
<mx:LineSeries yField="orange" name="Orange"/>
<mx:LineSeries yField="banana" name="Banana"/>
</mx:series>
</mx:LineChart>
<mx:Button id="b1" click="srv.send();" label="Load Data"/>
</mx:Application>
In the preceding example, the filters property is set to log messages for all classes in the mx.rpc and
mx.messaging packages. In this case, it logs messages for the HTTPService class, which is in the mx.rpc.http.*
package.
You can also configure a log target in MXML. When you do this, though, you must be sure to use an appropriate
number (such as 2) rather than a constant (such as
DEBUG). The following example sets the values of the filters for
a TraceTarget logging target by using MXML syntax:
<?xml version="1.0"?>
<!-- charts/MXMLTraceTarget.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp();">
<mx:Script><![CDATA[
import mx.collections.ArrayCollection;
import mx.logging.Log;
[Bindable]
public var myData:ArrayCollection;
private function initApp():void {
Log.addTarget(logTarget);
}
]]></mx:Script>
<mx:TraceTarget id="logTarget"
includeDate="true"
includeTime="true"