<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="changeRequest.send()" layout="absolute"> <mx:HTTPService id="changeRequest" url="http://mac-matt.perforce.com/cgi-bin/p4xml.pl?cmd=changes;max=30;long=;" resultFormat="e4x" result="changesResultHandler(event);" fault="changesFaultHandler(event);" /> <mx:Script> <![CDATA[ import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; [Bindable] private var changesFeed:XML; private function changesResultHandler( event:ResultEvent ):void { changesFeed = event.result as XML; } private function changesFaultHandler( event:FaultEvent ):void { } ]]> </mx:Script> <mx:VDividedBox height="98%" width="98%" borderStyle="none" x="7.5" y="6"> <mx:DataGrid id="submittedList" x="10" y="10" width="100%" height="50%" dataProvider="{changesFeed.change}"> <mx:columns> <mx:DataGridColumn headerText="Change" dataField="@id" width="60"/> <mx:DataGridColumn headerText="Time" dataField="time" width="80"/> <mx:DataGridColumn headerText="User" dataField="user"/> <mx:DataGridColumn headerText="Workspace" dataField="client" width="180"/> <mx:DataGridColumn headerText="Description" dataField="desc"/> </mx:columns> </mx:DataGrid> <mx:Canvas width="100%" height="50%" borderStyle="none" backgroundColor="#f7f7f7"> <mx:TextArea width="100" height="22" htmlText="{submittedList.selectedItem.@id}" left="83" top="10"/> <mx:Label text="Change" left="27" top="11"/> <mx:Label text="User" left="342.5" top="12"/> <mx:TextArea height="22" width="200" htmlText="{submittedList.selectedItem.user}" left="380.5" top="11"/> <mx:Label text="Time" top="41" left="42"/> <mx:TextArea width="160" height="22" htmlText="{submittedList.selectedItem.time}" top="40" left="83"/> <mx:Label x="335.5" y="38" text="Client"/> <mx:TextArea width="200" height="22" htmlText="{submittedList.selectedItem.client}" top="40" left="380"/> <mx:Label text="Description" left="10" top="71"/> <mx:TextArea htmlText="{submittedList.selectedItem.desc}" bottom="10" top="70" left="83" right="78"/> </mx:Canvas> </mx:VDividedBox> </mx:Application>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 6176 | Matt Attaway |
Add a sample Flex application. Change the path in the URL handler and fire away. |