チェンジセット 2224
- コミット日時:
- 2009/02/08 02:58:20 (3 年前)
- ファイル:
-
- air/TLife/TLife.as3proj (更新) (1 diff)
- air/TLife/bin/TLife.swf (更新) (変更前)
- air/TLife/lib/xpath-as3-1.0.0.swc (追加)
- air/TLife/obj/TLifeConfig.old (更新) (1 diff)
- air/TLife/obj/TLifeConfig.xml (更新) (1 diff)
- air/TLife/src/Main.mxml (更新) (2 diffs)
- air/TLife/src/uwi/search/IncrementalSearchThread.as (更新) (1 diff)
- air/TLife/src/uwi/thread/MainThread.as (更新) (2 diffs)
- air/TLife/src/uwi/ui/GlobalConfig.mxml (更新) (7 diffs)
- air/TLife/src/uwi/ui/GlobalConfigEventThread.as (追加)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
air/TLife/TLife.as3proj
r2199 r2224 46 46 <element path="lib\Thread-1.0.swc" /> 47 47 <element path="lib\tweener.swc" /> 48 <element path="lib\xpath-as3-1.0.0.swc" /> 48 49 </libraryPaths> 49 50 <!-- External Libraries --> air/TLife/obj/TLifeConfig.old
r2199 r2224 14 14 <path-element>E:\flash\TLife\lib\Thread-1.0.swc</path-element> 15 15 <path-element>E:\flash\TLife\lib\tweener.swc</path-element> 16 <path-element>E:\flash\TLife\lib\xpath-as3-1.0.0.swc</path-element> 16 17 </library-path> 17 18 </compiler> air/TLife/obj/TLifeConfig.xml
r2199 r2224 14 14 <path-element>E:\flash\TLife\lib\Thread-1.0.swc</path-element> 15 15 <path-element>E:\flash\TLife\lib\tweener.swc</path-element> 16 <path-element>E:\flash\TLife\lib\xpath-as3-1.0.0.swc</path-element> 16 17 </library-path> 17 18 </compiler> air/TLife/src/Main.mxml
r2221 r2224 71 71 tabbar.changeLayout(); 72 72 tabbar.SelectedIndex = 0; 73 trace("index : " + tabbar.SelectedIndex);74 73 75 74 /* … … 78 77 newWindow.open(true); 79 78 */ 80 81 var newWindow : GlobalConfig = new GlobalConfig();82 newWindow.open(true);83 79 84 80 postarea.setFocus(); air/TLife/src/uwi/search/IncrementalSearchThread.as
r2221 r2224 69 69 } 70 70 71 private static const STR_SEARCH : Array = ["", "post検索:", "userid検索 ", "username検索"];71 private static const STR_SEARCH : Array = ["", "post検索:", "userid検索:", "username検索:"]; 72 72 73 73 private function onKeyDown(e : KeyboardEvent) : void air/TLife/src/uwi/thread/MainThread.as
r2221 r2224 21 21 import uwi.twitter.TwitterLoginThread; 22 22 import uwi.twitter.TwitterReloadThread; 23 import uwi.ui.MultipleTabBar; 24 import uwi.ui.MultipleTabBarDragEventThread; 25 import uwi.ui.MultipleTabBarEventThread; 23 import uwi.ui.*; 26 24 import uwi.util.CommonData; 27 25 import uwi.util.FileIO; … … 125 123 new DataGridEventThread().start(); 126 124 125 var newWindow : GlobalConfig = new GlobalConfig(); 126 newWindow.open(true); 127 127 128 sssss = getTimer(); 128 129 var se : SerialExecutor = new SerialExecutor(); 129 se.addThread(new TwitterLoginThread(CommonData.configxml.userid, CommonData.configxml.password)); 130 se.addThread(new TwitterReloadThread(1, 2)); 131 // se.addThread(new TwitterReloadThread(1, "nekocafe")); 130 // se.addThread(new TwitterLoginThread(CommonData.configxml.userid, CommonData.configxml.password)); 131 // se.addThread(new TwitterReloadThread(1, 2)); 132 132 se.addThread(new TimelineThread(20)); 133 133 se.start(); air/TLife/src/uwi/ui/GlobalConfig.mxml
r2199 r2224 2 2 <mx:Window 3 3 xmlns:mx="http://www.adobe.com/2006/mxml" 4 title=" Preferences"4 title="Config" 5 5 width="300" 6 6 height="400" … … 15 15 minimizable="false" 16 16 maximizable="false" 17 resizable=" false"17 resizable="true" 18 18 creationComplete="onLoad()" 19 19 > … … 21 21 <mx:Script> 22 22 <![CDATA[ 23 import flash.events.Event; 24 import flash.utils.getTimer; 25 import memorphic.xpath.XPathUtils; 23 26 import mx.collections.ArrayCollection; 27 import mx.collections.Sort; 28 import mx.collections.SortField; 29 import mx.core.Application; 24 30 import mx.core.WindowedApplication; 31 import uwi.ui.GlobalConfigEventThread; 25 32 import uwi.util.CommonData; 26 33 27 34 [Bindable] 28 private var setvalue : ArrayCollection = new ArrayCollection(); 35 public var setvalue : ArrayCollection = new ArrayCollection(); 36 29 37 private var tempconfigxml : XML; 30 38 private static var main : Main = null; … … 37 45 private function onLoad() : void 38 46 { 39 tempconfigxml = CommonData.configxml; 47 tempconfigxml = CommonData.configxml.copy(); 48 49 var xml : XML; 50 var configs : Object = {}; 51 for each(xml in tempconfigxml.children()) 52 mergeObjects(extractPathes(xml), configs); 53 54 /* 55 for (var key : String in configs) { 56 trace(key + "\t" + configs[key].text()); 57 } 58 */ 59 60 var langs : Object = {}; 61 for each(xml in CommonData.langxml.children()) 62 mergeObjects(extractPathes(xml), langs); 63 64 for (var key : String in configs) { 65 setvalue.addItem( { 66 path : key, 67 value : configs[key], 68 remarks : langs[key] 69 }); 70 } 71 72 var sort : Sort = new Sort(); 73 sort.fields = [new SortField("path", true)]; 74 setvalue.sort = sort; 75 setvalue.refresh(); 76 77 new GlobalConfigEventThread(this).start(); 78 } 79 80 /** 81 * XPathではない 82 * @param src 83 * @param path 84 * @return 85 */ 86 public function extractPathes(src : XML, path : String = "") : Object 87 { 88 var map : Object = { }; 89 if (src.hasSimpleContent()) { 90 map[path + src.localName()] = src; 91 return map; 92 } 93 path += src.localName() + "."; 94 95 for each(var xml : XML in src.children()) { 96 mergeObjects(extractPathes(xml, path), map); 97 } 98 return map; 99 } 100 101 private static function mergeObjects(src : Object, dst : Object) : void 102 { 103 for (var key : String in src) { 104 dst[key] = src[key]; 105 } 40 106 } 41 107 42 108 private function reflect() : void 43 109 { 110 44 111 } 45 112 … … 51 118 horizontalAlign="left" 52 119 > 53 <mx:VBox label="全般" width="100%" height="100%">120 <mx:VBox id="tn0" label="全般" width="100%" height="100%"> 54 121 <mx:Form width="100%" height="100%"> 55 122 <mx:FormItem width="100%" height="25" label="ユーザー名"> … … 61 128 </mx:Form> 62 129 </mx:VBox> 63 <mx:VBox label="詳細設定" width="100%" height="100%"> 130 <mx:VBox id="tn1" label="詳細設定" width="100%" height="100%"> 131 <mx:TextInput id="searchbox" width="100%" /> 64 132 <mx:DataGrid id="dg" width="100%" height="100%" dataProvider="{setvalue}" 65 133 useRollOver="true" … … 73 141 > 74 142 <mx:columns> 75 <mx:DataGridColumn headerText="設定名" dataField=" key" width="100" />76 <mx:DataGridColumn headerText="設定値" dataField="value" width="40" />77 <mx:DataGridColumn headerText="備考" dataField="remarks" width="70" />143 <mx:DataGridColumn headerText="設定名" dataField="path" editable="false" width="100" /> 144 <mx:DataGridColumn headerText="設定値" dataField="value" editable="true" width="40" /> 145 <mx:DataGridColumn headerText="備考" dataField="remarks" editable="false" width="70" /> 78 146 </mx:columns> 79 147 </mx:DataGrid>

