チェンジセット 2370
- コミット日時:
- 2009/03/25 08:18:02 (3 年前)
- ファイル:
-
- air/TLife/SelfSigned.pfx (更新) (変更前)
- air/TLife/air/TLife.ZIP (追加)
- air/TLife/air/TLife.air (更新) (変更前)
- air/TLife/bin/TLife.swf (更新) (変更前)
- air/TLife/bin/initial/config.xml (更新) (1 diff)
- air/TLife/src/Main.mxml (更新) (12 diffs)
- air/TLife/src/uwi/db/DBSupplyThread2.as (更新) (1 diff)
- air/TLife/src/uwi/search/IncrementalSearchThread.as (削除)
- air/TLife/src/uwi/search/Searcher.as (更新) (3 diffs)
- air/TLife/src/uwi/thread/ContextMenuItemEventThread.as (削除)
- air/TLife/src/uwi/thread/DataGridEventThread.as (削除)
- air/TLife/src/uwi/thread/DataGridRoutineThread.as (削除)
- air/TLife/src/uwi/thread/FrameTimerThread.as (削除)
- air/TLife/src/uwi/thread/MainThread.as (更新) (4 diffs)
- air/TLife/src/uwi/thread/NotifyNewThread.as (更新) (3 diffs)
- air/TLife/src/uwi/thread/PostAreaChangeThread.as (削除)
- air/TLife/src/uwi/thread/PostEventThread.as (削除)
- air/TLife/src/uwi/thread/ReloadThread.as (更新) (2 diffs)
- air/TLife/src/uwi/thread/TabbarChangeEventThread.as (削除)
- air/TLife/src/uwi/thread/TextAreaFeatureThread.as (削除)
- air/TLife/src/uwi/thread/TextAreaFetaureSubThread.as (削除)
- air/TLife/src/uwi/thread/TimelineThread.as (更新) (4 diffs)
- air/TLife/src/uwi/thread/event (追加)
- air/TLife/src/uwi/thread/event/ContextMenuItemEventThread.as (追加)
- air/TLife/src/uwi/thread/event/DataGridEventThread.as (追加)
- air/TLife/src/uwi/thread/event/DataGridRoutineThread.as (追加)
- air/TLife/src/uwi/thread/event/IncrementalSearchThread.as (追加)
- air/TLife/src/uwi/thread/event/PostEventThread.as (追加)
- air/TLife/src/uwi/thread/event/TabbarChangeEventThread.as (追加)
- air/TLife/src/uwi/thread/event/UndoThread.as (追加)
- air/TLife/src/uwi/ui/Balloon.mxml (削除)
- air/TLife/src/uwi/ui/DBSearchWindow.mxml (削除)
- air/TLife/src/uwi/ui/DBSearchWindowEventThread.as (削除)
- air/TLife/src/uwi/ui/DataGridEx.as (更新) (1 diff)
- air/TLife/src/uwi/ui/GlobalConfig.mxml (削除)
- air/TLife/src/uwi/ui/GlobalConfigEventThread.as (削除)
- air/TLife/src/uwi/ui/MainMenu.mxml (削除)
- air/TLife/src/uwi/ui/MainMenuEventThread.as (削除)
- air/TLife/src/uwi/ui/MainStatusBar.mxml (削除)
- air/TLife/src/uwi/ui/MultipleTabBar.as (削除)
- air/TLife/src/uwi/ui/MultipleTabBarDragEventThread.as (削除)
- air/TLife/src/uwi/ui/MultipleTabBarEventThread.as (削除)
- air/TLife/src/uwi/ui/SearchWindow.mxml (削除)
- air/TLife/src/uwi/ui/SearchWindowEventThread.as (削除)
- air/TLife/src/uwi/ui/TabConfig.mxml (削除)
- air/TLife/src/uwi/ui/TabConfigEventThread.as (削除)
- air/TLife/src/uwi/ui/TextAreaEx.as (追加)
- air/TLife/src/uwi/ui/TimelineRenderer.as (更新) (1 diff)
- air/TLife/src/uwi/ui/balloon (追加)
- air/TLife/src/uwi/ui/balloon/Balloon.mxml (追加)
- air/TLife/src/uwi/ui/complete (追加)
- air/TLife/src/uwi/ui/complete/CompleteThread.as (追加)
- air/TLife/src/uwi/ui/complete/CompletionList.mxml (追加)
- air/TLife/src/uwi/ui/complete/UserIDCompleteThread.as (追加)
- air/TLife/src/uwi/ui/dbsearch (追加)
- air/TLife/src/uwi/ui/dbsearch/DBSearchWindow.mxml (追加)
- air/TLife/src/uwi/ui/dbsearch/DBSearchWindowEventThread.as (追加)
- air/TLife/src/uwi/ui/globalconfig (追加)
- air/TLife/src/uwi/ui/globalconfig/GlobalConfig.mxml (追加)
- air/TLife/src/uwi/ui/globalconfig/GlobalConfigEventThread.as (追加)
- air/TLife/src/uwi/ui/mainmenu (追加)
- air/TLife/src/uwi/ui/mainmenu/MainMenu.mxml (追加)
- air/TLife/src/uwi/ui/mainmenu/MainMenuEventThread.as (追加)
- air/TLife/src/uwi/ui/mainstatusbar (追加)
- air/TLife/src/uwi/ui/mainstatusbar/MainStatusBar.mxml (追加)
- air/TLife/src/uwi/ui/multipletabbar (追加)
- air/TLife/src/uwi/ui/multipletabbar/MultipleTabBar.as (追加)
- air/TLife/src/uwi/ui/multipletabbar/MultipleTabBarDragEventThread.as (追加)
- air/TLife/src/uwi/ui/multipletabbar/MultipleTabBarEventThread.as (追加)
- air/TLife/src/uwi/ui/search (追加)
- air/TLife/src/uwi/ui/search/SearchWindow.mxml (追加)
- air/TLife/src/uwi/ui/search/SearchWindowEventThread.as (追加)
- air/TLife/src/uwi/ui/tabconfig (追加)
- air/TLife/src/uwi/ui/tabconfig/TabConfig.mxml (追加)
- air/TLife/src/uwi/ui/tabconfig/TabConfigEventThread.as (追加)
- air/TLife/src/uwi/util/CommonData.as (更新) (3 diffs)
- air/TLife/src/uwi/util/EventThread.as (追加)
- air/TLife/src/uwi/util/FrameTimerThread.as (追加)
- air/TLife/src/uwi/util/StatusUtility.as (更新) (1 diff)
- air/TLife/src/uwi/util/TabRuleUtility.as (更新) (4 diffs)
- air/TLife/unused/PostAreaChangeThread.as (追加)
- air/TLife/unused/TextAreaFetaureSubThread.as (追加)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
air/TLife/bin/initial/config.xml
r2199 r2370 1 <tlife> 2 <username>muwi</username> 3 <password>mugicha</password> 4 <main> 5 <x>0</x> 6 <y>0</y> 7 <width>360</width> 8 <height>380</height> 1 <tlife> 2 <userid>tekito-</userid> 3 <password>tekito-</password> 4 <numpageget> 5 <recent>1</recent> 6 <reply>1</reply> 7 </numpageget> 8 <numstatusprint> 9 <recent>20</recent> 10 <reply>20</reply> 11 </numstatusprint> 12 <footer/> 13 <main x="15" y="8" width="480" height="499"> 9 14 <dg> 15 <rowheight>32</rowheight> 10 16 <interval>2</interval> 17 <dateformat>YY/MM/DD J:NN:SS</dateformat> 18 <selectioncolor>0xcdffc1</selectioncolor> 19 <columns> 20 <column datafield="iconurl" header="アイコン" width="54"/> 21 <column datafield="postername" header="ユーザー名" width="125"/> 22 <column datafield="content" header="内容" width="88"/> 23 <column datafield="posterid" header="ID" width="94"/> 24 <column datafield="postedtime" header="時刻" width="98"/> 25 </columns> 11 26 </dg> 27 <tabbar> 28 <tab name="Recent" notify="true"/> 29 <tab name="Reply" notify="true"/> 30 </tabbar> 12 31 <isearch> 13 <migemo>true</migemo> 14 <timeout>2000</timeout> 32 <timeout>10000</timeout> 15 33 </isearch> 34 <fontcolor> 35 <timeline>0x000000</timeline> 36 <fav>0xff0000</fav> 37 </fontcolor> 38 <replyname width="108"/> 39 <vbox000 height="298"/> 40 <friendimage>true</friendimage> 16 41 </main> 42 <search> 43 <queryuserid> 44 <numhistory>10</numhistory> 45 </queryuserid> 46 <querycontent> 47 <numhistory>10</numhistory> 48 </querycontent> 49 <at>false</at> 50 <cosuffix>false</cosuffix> 51 <url>false</url> 52 <word>false</word> 53 <regexp>false</regexp> 54 <migemo>false</migemo> 55 <fav>false</fav> 56 <capital>true</capital> 57 <twobyte>true</twobyte> 58 <closedialog>false</closedialog> 59 </search> 60 <dbsearch> 61 <queryuserid> 62 <numhistory>10</numhistory> 63 </queryuserid> 64 <querycontent> 65 <numhistory>10</numhistory> 66 </querycontent> 67 <dbregexp>false</dbregexp> 68 <migemo>false</migemo> 69 <fav>false</fav> 70 <capital>false</capital> 71 <twobyte>false</twobyte> 72 </dbsearch> 73 <tabconfig x="0" y="0" width="600" height="400"/> 74 <globalconfig x="0" y="0" width="600" height="400"/> 75 <backup>false</backup> 17 76 </tlife> air/TLife/src/Main.mxml
r2363 r2370 3 3 xmlns:mx="http://www.adobe.com/2006/mxml" 4 4 xmlns:uwi="uwi.ui.*" 5 xmlns:uwimtb="uwi.ui.multipletabbar.*" 5 6 width="300" height="350" 6 7 title="TLife" … … 16 17 layout="absolute" 17 18 applicationComplete="onLoad()" 18 statusBarFactory="{new ClassFactory(uwi.ui. MainStatusBar)}"19 statusBarFactory="{new ClassFactory(uwi.ui.mainstatusbar.MainStatusBar)}" 19 20 > 20 21 … … 51 52 import mx.core.BitmapAsset; 52 53 import mx.core.ClassFactory; 53 import mx.core. UITextField;54 import mx.core.IUITextField; 54 55 import mx.core.Window; 55 56 import mx.utils.ArrayUtil; … … 60 61 import uwi.thread.MainThread; 61 62 import uwi.ui.*; 63 import uwi.ui.mainstatusbar.MainStatusBar; 62 64 import uwi.util.CommonData; 63 65 import uwi.util.Utility; … … 141 143 } 142 144 145 private static const EVENT_CHARLEFT : Event = new Event("charleft"); 146 143 147 public function changeCharLeft() : void 144 148 { … … 155 159 // StringValidator用 156 160 // XXX ときどきrepaintしないと元の色に戻らない場合がある。バグ? 157 postarea.dispatchEvent( new Event("charleft"));161 postarea.dispatchEvent(EVENT_CHARLEFT); 158 162 } 159 163 … … 170 174 for each(var tab : XML in CommonData.configxml.main.tabbar.tab) { 171 175 ar.push(tab.@name.toString()); 172 CommonData.tabmap[tab.@name.toString()] = {selectedid : -1, scrollposid : -1, newestid : -1, notify : Boolean(tab.@notify)}; 176 CommonData.tabmap[tab.@name.toString()] = { 177 selectedid : -1, 178 scrollposid : -1, 179 newestid : -1, 180 notify : Boolean(tab.@notify), 181 conn : CommonData.db_memory.conn, 182 cansave : true, 183 candup : true 184 }; 173 185 } 174 186 tabbar.titles = new ArrayCollection(ar); … … 231 243 delete CommonData.configxml.main.dg.columns.column; 232 244 for each(var c : DataGridColumn in Application.application.dg.columns) { 233 CommonData.configxml.main.dg.columns.appendChild(XML("<column datafield=\"" + c.dataField + "\" header=\"" + c.headerText + "\" width=\"" + int(c.width) + "\"/>")); 245 var colxml : XML = <column />; 246 colxml.@datafield = c.dataField; 247 colxml.@header = c.headerText; 248 colxml.@width = int(c.width); 249 CommonData.configxml.main.dg.columns.appendChild(colxml)); 234 250 } 235 251 } … … 251 267 // XXX too dangerous! 252 268 // TextArea.textField 253 var pos : int = (friendpost.getChildAt(2) as UITextField).getCharIndexAtPoint(event.localX, event.localY);269 var pos : int = (friendpost.getChildAt(2) as IUITextField).getCharIndexAtPoint(event.localX, event.localY); 254 270 if (pos == CommonData.FPprevpos || pos == -1) return; 255 271 CommonData.FPprevpos = pos; … … 276 292 // XXX too dangerous! 277 293 // Text.textField 278 var pos : int = (replypost.getChildAt(0) as UITextField).getCharIndexAtPoint(event.localX, event.localY);294 var pos : int = (replypost.getChildAt(0) as IUITextField).getCharIndexAtPoint(event.localX, event.localY); 279 295 if (pos == CommonData.RPprevpos || pos == -1) return; 280 296 CommonData.RPprevpos = pos; … … 368 384 --> 369 385 </uwi:DataGridEx> 370 <uwi :MultipleTabBar id="tabbar" width="100%" height="20" verticalGap="0"/>386 <uwimtb:MultipleTabBar id="tabbar" width="100%" height="20" verticalGap="0"/> 371 387 </mx:VBox> 372 388 <!-- friendpost欄 --> … … 389 405 <!-- post欄 --> 390 406 <mx:HBox id="postcontainer" width="100%" height="40" horizontalGap="0" horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalAlign="middle"> 391 < mx:TextAreaid="postarea" width="100%" height="40" />407 <uwi:TextAreaEx id="postarea" width="100%" height="40" /> 392 408 <mx:Label id="charleft" width="40" height="20" text="" textAlign="center"/> 393 409 <mx:Button id="postbtn" width="60" height="40" label="post" /> air/TLife/src/uwi/db/DBSupplyThread2.as
r2363 r2370 61 61 private function onFCTComplete() : void 62 62 { 63 trace("result : " + fct.result);64 63 if(fct.result == 0){ 65 64 loaderthread.start(); air/TLife/src/uwi/search/Searcher.as
r2363 r2370 54 54 55 55 if (option.cosuffix) { 56 // TODO やりなおし 57 var vec : Vector.<String> = new Vector.<String>(); 58 for each(var t : Object in tl) { 59 vec.push(t.content); 60 } 61 vec = StatusUtility.removeCoSuffix(vec, 4, 4); 56 var vec : Vector.<String> = StatusUtility.removeCoSuffixForTimeline(tl, 4, 4); 57 62 58 } 63 59 … … 148 144 var title : String = Utility.addAvoidingOverlap(Application.application.tabbar.titles, "検索結果"); 149 145 146 150 147 var conds : Array = []; 151 148 if (query.postid) { … … 176 173 } 177 174 178 CommonData.rulequerymap[title] = " where " + conds.join(" and "); 175 CommonData.tabmap[title] = { 176 nosave : true, 177 nodup : true, 178 rule : " where " + conds.join(" and ") 179 } 179 180 Application.application.tabbar.selectTabName(title); 180 181 } 181 182 183 /** 184 * queryの前処理 185 * @param query 186 * @param option 187 */ 182 188 private static function preprocess(query : Object, option : Object) : void 183 189 { air/TLife/src/uwi/thread/MainThread.as
r2341 r2370 22 22 import uwi.db.DB; 23 23 import uwi.migemo.AIRMigemo; 24 import uwi.search.IncrementalSearchThread;25 24 import uwi.search.Searcher; 25 import uwi.thread.event.ContextMenuItemEventThread; 26 import uwi.thread.event.DataGridEventThread; 27 import uwi.thread.event.IncrementalSearchThread; 28 import uwi.thread.event.PostEventThread; 29 import uwi.thread.event.TabbarChangeEventThread; 30 import uwi.thread.event.UndoThread; 31 import uwi.thread.InitialMovementThread; 32 import uwi.thread.ReloadTimerThread; 26 33 import uwi.twitter.TwitterFriendsInfoGetThread; 27 34 import uwi.ui.DataGridEx; 28 import uwi.ui.GlobalConfig; 29 import uwi.ui.MultipleTabBar; 30 import uwi.ui.MultipleTabBarDragEventThread; 31 import uwi.ui.MultipleTabBarEventThread; 32 import uwi.ui.TabConfig; 35 import uwi.ui.multipletabbar.MultipleTabBar; 36 import uwi.ui.multipletabbar.MultipleTabBarDragEventThread; 37 import uwi.ui.multipletabbar.MultipleTabBarEventThread; 33 38 import uwi.util.CommonData; 34 39 import uwi.util.FileIO; … … 116 121 new IncrementalSearchThread().start(); 117 122 new PostEventThread().start(); 118 new TextAreaFeatureThread(Application.application.postarea, Application.application.changeCharLeft).start(); 119 new PostAreaChangeThread().start(); 123 new UndoThread(Application.application.postarea, Application.application.changeCharLeft).start(); 120 124 new MultipleTabBarEventThread(tabbar).start(); 121 125 new MultipleTabBarDragEventThread(tabbar).start(); 122 126 new DataGridEventThread().start(); 123 new InitialMovementThread().start();127 // new InitialMovementThread().start(); 124 128 // new ReloadTimerThread(CommonData.configxml.interval).start(); 125 129 } … … 139 143 return xml; 140 144 }catch (e : Error) { 141 Alert.show(file.name + "が不正です。\ n" + e.message, "TLife", Alert.OK, null, function(e : CloseEvent) : void { NativeApplication.nativeApplication.exit(); } );145 Alert.show(file.name + "が不正です。\r" + e.message, "TLife", Alert.OK, null, function(e : CloseEvent) : void { NativeApplication.nativeApplication.exit(); } ); 142 146 } 143 147 }else { … … 159 163 // tabmapの保存 160 164 for each(var tab : XML in CommonData.configxml.main.tabbar.tab) { 165 CommonData.configxml 161 166 tab.@notify = CommonData.tabmap[tab.@name.toString()].notify; 162 167 } air/TLife/src/uwi/thread/NotifyNewThread.as
r2363 r2370 7 7 import org.libspark.thread.utils.SerialExecutor; 8 8 import uwi.db.DBSelectThread; 9 import uwi.ui. Balloon;10 import uwi.ui. MultipleTabBar;9 import uwi.ui.balloon.Balloon; 10 import uwi.ui.multipletabbar.MultipleTabBar; 11 11 import uwi.util.CommonData; 12 12 import uwi.util.StatusUtility; … … 59 59 break; 60 60 default: 61 sql = sqlbase + CommonData. rulequerymap[tabname]+ " and " + condnewer + " order by postid desc";61 sql = sqlbase + CommonData.tabmap[tabname].rule + " and " + condnewer + " order by postid desc"; 62 62 break; 63 63 } … … 167 167 text += status.postername; 168 168 text += " : "; 169 text += status.content.substring(0, 30).replace(/\ n/g, " ");170 text += "\ n";169 text += status.content.substring(0, 30).replace(/\r/g, " "); 170 text += "\r"; 171 171 } 172 172 b.text = text; air/TLife/src/uwi/thread/ReloadThread.as
r2341 r2370 17 17 { 18 18 private static var reloading : Boolean = false; 19 private var posterids : Array; 19 20 20 public function ReloadThread( )21 public function ReloadThread(...posterids) 21 22 { 23 this.posterids = posterids; 22 24 } 23 25 … … 27 29 if (!reloading) { 28 30 var se : SerialExecutor = new SerialExecutor(); 29 se.addThread(new TwitterTimelineGetThread()); 31 if (posterids.length == 0) { 32 33 } 34 if (posterid != null) { 35 var pep : ParallelExecutor = new ParallelExecutor(); 36 for each(var posterid : String in posterids){ 37 pep.addThread(new TwitterTimelineGetThread(20, 1, posterid)); 38 } 39 se.addThread(pep); 40 }else{ 41 se.addThread(new TwitterTimelineGetThread()); 42 } 30 43 // se.addThread(new TwitterTimelineGetThread(20, 1, "yotsuya")); 31 44 // se.addThread(new TwitterTimelineGetThread(20, 1, "yotsuyi")); air/TLife/src/uwi/thread/TimelineThread.as
r2356 r2370 1 1 package uwi.thread { 2 import flash.data.SQLConnection; 2 3 import flash.data.SQLResult; 3 4 import flash.utils.Dictionary; … … 11 12 import uwi.db.DBSelectThread; 12 13 import uwi.ui.DataGridEx; 13 import uwi.ui. MultipleTabBar;14 import uwi.ui.multipletabbar.MultipleTabBar; 14 15 import uwi.util.CommonData; 15 16 import uwi.util.StatusUtility; … … 33 34 private var posterdata : Object; // <ID, poster> 34 35 35 public function TimelineThread(prefetch : int = -1 , query : String = null) {36 public function TimelineThread(prefetch : int = -1) { 36 37 this.prefetch = prefetch; 37 38 this.query = query; … … 55 56 CommonData.TABLE_STATUS; 56 57 var sql : String = null; 57 if (query != null) { 58 sql = sqlbase + " where content glob '*" + query + "*' order by postid desc"; 59 }else { 60 switch(tabname) { 61 case CommonData.LABEL_RECENT: 62 sql = sqlbase + 63 " where posterid in (select posterid from " + 64 CommonData.TABLE_FOLLOWING + 65 " where userid = '" + CommonData.configxml.userid + "')" + 66 " order by postid desc"; 67 break; 68 case CommonData.LABEL_REPLY: 69 sql = sqlbase + " where content glob '*@" + CommonData.configxml.userid + "*' order by postid desc"; 70 break; 71 default: 72 sql = sqlbase + CommonData.rulequerymap[tabname] + " order by postid desc"; 73 break; 74 } 58 switch(tabname) { 59 case CommonData.LABEL_RECENT: 60 sql = sqlbase + 61 " where posterid in (select posterid from " + 62 CommonData.TABLE_FOLLOWING + 63 " where userid = '" + CommonData.configxml.userid + "')" + 64 " order by postid desc"; 65 break; 66 case CommonData.LABEL_REPLY: 67 sql = sqlbase + " where content glob '*@" + CommonData.configxml.userid + "*' order by postid desc"; 68 break; 69 default: 70 sql = sqlbase + CommonData.tabmap[tabname].rule + " order by postid desc"; 71 break; 75 72 } 76 73 trace("sql : " + sql); 77 if (sql == null) return;78 74 79 dbst = new DBSelectThread(CommonData. db_memory.conn, sql, prefetch);75 dbst = new DBSelectThread(CommonData.tabmap[tabname].conn, sql, prefetch); 80 76 dbst.start(); 81 77 dbst.join(); air/TLife/src/uwi/ui/DataGridEx.as
r2113 r2370 1 package uwi.ui 1 package uwi.ui 2 2 { 3 3 import mx.controls.DataGrid; air/TLife/src/uwi/ui/TimelineRenderer.as
r2294 r2370 1 package uwi.ui 1 package uwi.ui 2 2 { 3 3 import mx.controls.dataGridClasses.DataGridItemRenderer; air/TLife/src/uwi/util/CommonData.as
r2363 r2370 1 1 package uwi.util { 2 2 import flash.filesystem.File; 3 import flash.ui.ContextMenuItem;4 3 import flash.utils.Dictionary; 5 import mx.collections.ArrayCollection;6 import mx.controls.dataGridClasses.DataGridItemRenderer;7 import mx.core.Window;8 4 import mx.formatters.DateFormatter; 9 5 import uwi.bean.TabRule; … … 11 7 import uwi.migemo.AIRMigemo; 12 8 import uwi.search.Searcher; 13 import uwi.thread. DataGridEventThread;14 import uwi.thread. DataGridRoutineThread;9 import uwi.thread.event.DataGridEventThread; 10 import uwi.thread.event.DataGridRoutineThread; 15 11 import uwi.thread.ReplyGetThread; 16 12 import uwi.tinysegmenter.TinySegmenter; 17 import uwi.ui.Balloon; 18 import uwi.ui.TabConfig; 19 import uwi.ui.GlobalConfig; 20 import uwi.ui.MainStatusBar; 21 import uwi.ui.SearchWindow; 22 import uwi.ui.DBSearchWindow; 23 import uwi.ui.ImageEx; 24 import uwi.ui.TimelineRenderer; 13 import uwi.ui.globalconfig.GlobalConfig; 14 import uwi.ui.tabconfig.TabConfig; 15 import uwi.ui.search.SearchWindow; 16 import uwi.ui.dbsearch.DBSearchWindow; 17 import uwi.ui.mainstatusbar.MainStatusBar; 18 import uwi.ui.*; 25 19 26 20 /** … … 70 64 public static var tabrules : Vector.<TabRule> = new Vector.<TabRule>(); 71 65 72 public static var rulequerymap : Object = {}; // <String(TabName), String(SQLQuery)>73 66 public static var urlcache : Object = {}; // URL解決用のキャッシュ 74 67 public static var tabmap : Object = { }; // タブごとのデータへのMap 75 68 // <tabtitle : String, data : Object> 76 // postid : String or Number 選択されているpostid 77 // newestid : String or Number 最新のpostid 78 // notify : Boolean 新着通知するかどうか -> configxmlへ 69 // postid : String or Number 選択されているpostid 70 // newestid : String or Number 最新のpostid 71 // notify : Boolean 新着通知するかどうか -> configxmlへ 72 // rule : String 抽出ルールを表すSQLクエリ 73 // conn : SQLConnection timelineを取得するConnection 74 // cansave : Boolean save可能か 75 // candup : Boolean 複製可能か 79 76 public static var prevtabname : String = null; 80 77 air/TLife/src/uwi/util/StatusUtility.as
r2363 r2370 7 7 public class StatusUtility 8 8 { 9 public static function removeCoSuffixForTimeline(src : Array, inf : int, infcosfx : int = 4) : Vector.<String> 10 { 11 var map : Object = { }; // <String, Vector.<String>> 12 var indexes : Vector.<int> = new Vector.<int>(); // indexes[n] = src[n].contentに対応するStringがmapのvalueの何番目にあるか 13 14 // mapとindexesに格納 15 for each(var obj : Object in src) { 16 var posterid : String = obj.posterid; 17 18 if (!map[posterid]) { 19 map[posterid] = new Vector.<String>(); 20 } 21 map[posterid].push(obj.content); 22 indexes.push(map[posterid].length); 23 } 24 25 // 共通語尾削除 26 for (var key : String in map) { 27 map[key] = removeCoSuffix(map[key], inf, infcosfx); 28 } 29 30 // indexesを使って一本にまとめる 31 var ret : Vector.<String> = new Vector.<String>(); 32 for (var i : int = 0; i < src.length;i++){ 33 ret.push(map[src[i].posterid][indexes[i]]); 34 } 35 return ret; 36 } 37 9 38 /** 10 39 * 共通語尾の削除 11 40 * @param src 12 41 * @param inf 最低連続出現数 13 * TODO Timeline版をつくる14 42 */ 15 43 public static function removeCoSuffix(src : Vector.<String>, inf : int, infcosfx : int = 4) : Vector.<String> air/TLife/src/uwi/util/TabRuleUtility.as
r2356 r2370 3 3 import mx.core.Application; 4 4 import uwi.bean.TabRule; 5 import uwi.ui. MultipleTabBar;5 import uwi.ui.multipletabbar.MultipleTabBar; 6 6 /** 7 7 * ... … … 26 26 public static function appendQueryMap(rule : TabRule) : void 27 27 { 28 var sql : String = CommonData. rulequerymap[rule.tabname];28 var sql : String = CommonData.tabmap[rule.tabname].rule; 29 29 if (sql == null) sql = ""; 30 30 var vec : Vector.<String>; … … 80 80 break; 81 81 } 82 CommonData. rulequerymap[rule.tabname]= sql.replace(/^ and/, " where");82 CommonData.tabmap[rule.tabname].rule = sql.replace(/^ and/, " where"); 83 83 } 84 84 … … 86 86 public static function makeQueryMap() : void 87 87 { 88 CommonData.rulequerymap = {}; 88 for each(var val : Object in CommonData.tabmap) { 89 delete val.rule; 90 } 89 91 90 92 // 現存するタブに空文字列を割り当ててから 91 93 for each(var title : String in tabbar.titles) { 92 CommonData. rulequerymap[title]= "";94 CommonData.tabmap[title].rule = ""; 93 95 } 94 96

