Repository: flex-utilities Updated Branches: refs/heads/develop 516c24a27 -> 8e65353ea
FLEX-34480 Change so XML is embedded in application rather than loaded Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/8e65353e Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/8e65353e Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/8e65353e Branch: refs/heads/develop Commit: 8e65353ea5cb3336915cd0d7e2a2dbb2f00f66f7 Parents: 516c24a Author: Justin Mclean <jmcl...@apache.org> Authored: Sat Aug 23 11:39:08 2014 +1000 Committer: Justin Mclean <jmcl...@apache.org> Committed: Sat Aug 23 11:39:08 2014 +1000 ---------------------------------------------------------------------- TourDeFlex/TourDeFlex3/src/explorer.mxml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/8e65353e/TourDeFlex/TourDeFlex3/src/explorer.mxml ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex3/src/explorer.mxml b/TourDeFlex/TourDeFlex3/src/explorer.mxml index f000e07..596d18e 100755 --- a/TourDeFlex/TourDeFlex3/src/explorer.mxml +++ b/TourDeFlex/TourDeFlex3/src/explorer.mxml @@ -18,7 +18,7 @@ <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:explorer="*" width="100%" height="100%" pageTitle="{TITLE}" - initialize="sdk.send()" layout="vertical"> + initialize="init()" layout="vertical"> <fx:Script> <![CDATA[ @@ -27,6 +27,17 @@ static protected const TITLE:String = "Tour De Flex Component Explorer"; static protected const FULL_TITLE:String = "Apache Flex⢠Tour De Flex Component Explorer " + VERSION; + [Embed(source="explorer.xml", mimeType="application/octet-stream")] + private var XMLData:Class; + + private function init():void + { + var data:XML = XML(new XMLData()); + + explorerTree = XML(data.node); + compLibTree.dataProvider = explorerTree; + } + private function treeChanged(event:Event):void { var nodeApp:String = compLibTree.selectedItem.@app; @@ -40,19 +51,11 @@ compLibTree.expandItem(compLibTree.selectedItem, true, true); } } - - private function xmlLoaded():void - { - explorerTree = XML(sdk.lastResult.node); - compLibTree.dataProvider = explorerTree; - } ]]> </fx:Script> <fx:Declarations> <fx:XML id="explorerTree"/> - - <mx:HTTPService id="sdk" url="explorer.xml" resultFormat="e4x" result="xmlLoaded()" /> </fx:Declarations> <mx:HBox width="100%">