チェンジセット 2621

差分発生行の前後
無視リスト:
コミット日時:
2009/05/11 20:21:07 (3 年前)
コミッタ:
uwi
ログメッセージ:

臨時コミット

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • air/TLife/branches/OAuth/TLife.as3proj

    r2510 r2621  
    4949    <element path="lib\AirAutoUpdater.swc" /> 
    5050    <element path="lib\KenLogger.swc" /> 
     51    <element path="lib\as3corelib.swc" /> 
    5152  </libraryPaths> 
    5253  <!-- External Libraries --> 
  • air/TLife/branches/OAuth/application.xml

    r2546 r2621  
    33         
    44        <id>uwi.TLife</id>  
    5         <version>alpha12</version> 
     5        <version>alpha13</version> 
    66        <filename>TLife</filename> 
    77        <name>TLife</name>  
  • air/TLife/trunk/air/version.xml

    r2546 r2621  
    11<version> 
    2         <version>alpha12/version> 
     2        <version>alpha13/version> 
    33        <url>http://www.libspark.org/svn/air/TLife/trunk/air/TLife.air</url> 
    44</version>  
  • air/TLife/trunk/obj/TLifeConfig.old

    r2501 r2621  
    1717      <path-element>E:\flash\TLife\lib\AirAutoUpdater.swc</path-element> 
    1818      <path-element>E:\flash\TLife\lib\KenLogger.swc</path-element> 
     19      <path-element>E:\flash\TLife\lib\as3corelib.swc</path-element> 
    1920    </library-path> 
    2021  </compiler> 
  • air/TLife/trunk/obj/TLifeConfig.xml

    r2501 r2621  
    1717      <path-element>E:\flash\TLife\lib\AirAutoUpdater.swc</path-element> 
    1818      <path-element>E:\flash\TLife\lib\KenLogger.swc</path-element> 
     19      <path-element>E:\flash\TLife\lib\as3corelib.swc</path-element> 
    1920    </library-path> 
    2021  </compiler> 
  • air/TLife/trunk/src/Main.mxml

    r2589 r2621  
    6666                        public var timeline : ArrayCollection = new ArrayCollection(); 
    6767                         
    68                         [Embed(source = "../res/icon/icon_016.png")] 
    69                         private var icon_16 : Class; 
    70                         [Embed(source = "../res/icon/icon_032.png")] 
    71                         private var icon_32 : Class; 
    72                         [Embed(source = "../res/icon/icon_048.png")] 
    73                         private var icon_48 : Class; 
    74                         [Embed(source = "../res/icon/icon_128.png")] 
    75                         private var icon_128 : Class; 
     68                        [Embed(source = "../res/icon/icon_016.png")] private var icon_16 : Class; 
     69                        [Embed(source = "../res/icon/icon_032.png")] private var icon_32 : Class; 
     70                        [Embed(source = "../res/icon/icon_048.png")] private var icon_48 : Class; 
     71                        [Embed(source = "../res/icon/icon_128.png")] private var icon_128 : Class; 
    7672                         
    7773                        private var systemtrayicon : SystemTrayIcon; 
  • air/TLife/trunk/src/uwi/db/DB.as

    r2501 r2621  
    4343                        execute(conn,  
    4444                                "create table if not exists " + CommonData.TABLE_POSTER + "(" +  
    45                                 "posterid varchar(15) primary key," +  
     45                                "screenname varchar(15) primary key," +  
    4646                                "id integer not null default -1," +  
    4747                                "name text not null," +  
    48                                 "url text not null default ''," +  
     48                                "url text default ''," +  
    4949                                "iconurl string default null," + 
    5050                                "protected boolean not null default false," +  
    51                                 "following integer not null default -1," +  
    52                                 "follower integer not null default -1," +  
    53                                 "numpost integer not null default -1," +  
    54                                 "description string default null," +  
     51                                "createdat date default 0," + 
     52                                "nfriends integer not null default -1," +  
     53                                "nfollowers integer not null default -1," +  
     54                                "nstatuses integer not null default -1," +  
     55                                "description string defualt ''," +  
     56                                "lastpost string not null default ''," + 
     57                                "lastposttime date default 0," + 
    5558                                "lastupdated date not null" +  
    5659                                ")"); 
    5760                        execute(conn,  
    5861                                "create table if not exists " + CommonData.TABLE_FOLLOWING + "(" +  
    59                                 "userid varchar(15) not null," +  
    60                                 "posterid varchar(15) not null," +  
     62                                "idfrom varchar(15) not null," +  
     63                                "idto varchar(15) not null," +  
    6164                                "lastupdated date not null," +  
    62                                 "primary key(userid, posterid)" +  
     65                                "primary key(idfrom, idto)" +  
    6366                                ")"); 
    6467                } 
  • air/TLife/trunk/src/uwi/db/DBSelectThread.as

    r2546 r2621  
    1010         
    1111        /** 
    12          * ... 
     12         * DBに対しselect文を発行するThread 
    1313         * @author Uwi 
    1414         */ 
  • air/TLife/trunk/src/uwi/db/DBSupplyThread.as

    r2497 r2621  
    1919                private var conn : SQLConnection; 
    2020                private var sqltxt : String; 
     21                private var funcvalid : Function; 
    2122                 
    22                 public function DBSupplyThread(conn : SQLConnection, sqltxt : String, loaderthread : Thread)  
     23                public function DBSupplyThread(conn : SQLConnection, sqltxt : String, loaderthread : Thread, funcvalid : Function = null)  
    2324                { 
    2425                        nTry = 0; 
     
    2627                        this.sqltxt = sqltxt; 
    2728                        this.loaderthread = loaderthread; 
     29                        this.funcvalid = funcvalid; 
    2830                } 
    2931                 
     
    4244                        var ret : SQLResult = dbst.Result; 
    4345                        var ar : Array = ret.data; 
    44                         if (ar != null)
     46                        if (ar != null && (funcvalid == null || funcvalid.apply(null, [ar[0]])))
    4547                                data = ar[0]; 
    4648                        }else { 
  • air/TLife/trunk/src/uwi/thread/FollowingCheckThread.as

    r2533 r2621  
    3737                        this.supply = supply; 
    3838                        sqlprotected = "select protected, lastupdated from " + CommonData.TABLE_POSTER +  
    39                                 " where posterid = '" + StringUtility.escapeSQL(targid) + "'"; 
     39                                " where screenname = '" + StringUtility.escapeSQL(targid) + "'"; 
    4040                        sqlfollowing = "select lastupdated from " +  
    4141                                CommonData.TABLE_FOLLOWING +  
    42                                 " where userid = '" + StringUtility.escapeSQL(CommonData.configxml.login.userid) + "'" +  
    43                                 " and posterid = '" + StringUtility.escapeSQL(targid) + "'"; 
     42                                " where idfrom = '" + StringUtility.escapeSQL(CommonData.configxml.login.userid) + "'" +  
     43                                " and idto = '" + StringUtility.escapeSQL(targid) + "'"; 
    4444                } 
    4545                 
  • air/TLife/trunk/src/uwi/thread/InitialMovementThread.as

    r2589 r2621  
    66        import org.libspark.thread.Thread; 
    77        import org.libspark.thread.utils.SerialExecutor; 
     8        import uwi.twitter.TwitterBitStatusGetThread; 
     9        import uwi.twitter.TwitterFriendsInfoGetThread; 
    810        import uwi.twitter.TwitterLoginThread; 
    911        import uwi.twitter.TwitterMobileLoginThread; 
     
    1214        import uwi.util.Utility; 
    1315        import uwi.wassr.WassrLoginThread; 
     16        import uwi.ui.friends.Friends; 
    1417         
    1518        /** 
     
    3033                { 
    3134                        tlt = null; 
     35                         
    3236                } 
    3337                 
     
    6468                        if (tlt.result == 0) { 
    6569                                // ログイン成功時 
    66                                 CommonData.state = 1; 
     70//                              new Friends().open(true); 
     71                                 
    6772                                var rt : ReloadThread = new ReloadThread(true); 
    6873                                rt.start(); 
  • air/TLife/trunk/src/uwi/thread/MainThread.as

    r2589 r2621  
    3030        import uwi.thread.event.UndoThread; 
    3131        import uwi.thread.ReloadTimerThread; 
     32        import uwi.twitter.TwitterFriendsInfoGetThread; 
    3233        import uwi.twitter.TwitterMobileLogoutThread; 
    3334        import uwi.ui.multipletabbar.MultipleTabBarDragEventThread; 
     
    128129                        Security.loadPolicyFile("https://static.twitter.com/crossdomain.xml"); 
    129130                         
     131                        /* 
    130132                        new TabBarEventThread().start(); 
    131133                        new ContextMenuItemEventThread().start(); 
     
    136138                        new DataGridRoutineThread().start(); 
    137139                        new ReloadTimerThread(CommonData.configxml.interval).start(); 
     140                        */ 
    138141                         
    139142                        if (CommonData.configxml.login.userid == "" || CommonData.configxml.login.password == "") { 
     
    232235                private function onExit(e : Event) : void 
    233236                { 
    234                         e.preventDefault(); 
    235237                         
    236238                        // DBのクローズ 
     
    250252                         
    251253                        // ログアウト 
    252                         var tmlt : TwitterMobileLogoutThread = new TwitterMobileLogoutThread(); 
    253                         tmlt.start(); 
    254                         tmlt.join(); 
    255                         next(onLogout); 
     254                        if(CommonData.configxml.logoutonexit == "true"){ 
     255                                e.preventDefault(); 
     256                                var tmlt : TwitterMobileLogoutThread = new TwitterMobileLogoutThread(); 
     257                                tmlt.start(); 
     258                                tmlt.join(); 
     259                                next(onLogout); 
     260                        } 
    256261                } 
    257262                 
  • air/TLife/trunk/src/uwi/thread/NotifyNewThread.as

    r2589 r2621  
    5656                                        case CommonData.LABEL_RECENT: 
    5757                                                sql = sqlprefix +  
    58                                                         " where posterid in (select posterid from " +  
     58                                                        " where posterid in (select idto from " +  
    5959                                                        CommonData.TABLE_FOLLOWING +  
    60                                                         " where userid = '" + StringUtility.escapeSQL(CommonData.configxml.login.userid) + "')" + 
     60                                                        " where idfrom = '" + StringUtility.escapeSQL(CommonData.configxml.login.userid) + "')" + 
    6161                                                        " and " + condnewer +  
    6262                                                        (tabinfo.rule != "" ? (" and (" + tabinfo.rule + ")") : "") +  
     
    9999                        Logger.debug("NotifyNewThread onSelectComplete"); 
    100100                         
    101                         var tempdbstmap2 : Object = { }; 
    102                         dbstmap2 = { }; 
     101                        var posteridset2 : Object = { }; 
    103102                        newtimeline = { }; 
    104103                        for (var tabname : String in dbstmap) { 
     
    108107                                if (ar != null) { 
    109108                                        for each(var obj : * in ar) { 
    110                                                 tempdbstmap2[obj.posterid] = null; 
     109                                                posteridset2[obj.posterid] = null; 
    111110                                        } 
    112111                                         
     
    123122                        } 
    124123                                 
     124                        dbstmap2 = { }; 
    125125                        pe = new ParallelExecutor(); 
    126                         for (var posterid : String in tempdbstmap2) { 
    127                                 var sql : String = "select name, iconurl from " + CommonData.TABLE_POSTER + " where posterid = '" + posterid + "'"; 
     126                        for (var posterid : String in posteridset2) { 
     127                                var sql : String = "select name, iconurl from " + CommonData.TABLE_POSTER + " where screenname = '" + posterid + "'"; 
    128128                                var ddbst : DBSelectThread = new DBSelectThread(CommonData.db_memory.conn, sql); 
    129129                                dbstmap2[posterid] = ddbst; 
  • air/TLife/trunk/src/uwi/thread/ReplyGetThread.as

    r2589 r2621  
    1717         
    1818        /** 
    19          * ... 
    20          * @author ... 
     19         * reply先発言取得用Thread 
     20         * @author Uwi 
    2121         */ 
    2222        public class ReplyGetThread extends Thread  
     
    7474                                 
    7575                                dbst = new DBSelectThread(CommonData.db_memory.conn,  
    76                                         "select name from " + CommonData.TABLE_POSTER + " where posterid = '" + StringUtility.escapeSQL(posterid) + "'" 
     76                                        "select name from " + CommonData.TABLE_POSTER + " where screenname = '" + StringUtility.escapeSQL(posterid) + "'" 
    7777                                ); 
    7878                                dbst.start(); 
  • air/TLife/trunk/src/uwi/thread/StatusInsertThread.as

    r2546 r2621  
    7575                        var stmt_upd_poster : SQLStatement = new SQLStatement(); 
    7676                        stmt_upd_poster.sqlConnection = conn; 
    77                         stmt_upd_poster.text = "replace into " + CommonData.TABLE_POSTER + " (posterid, name, iconurl, lastupdated) values (:posterid, :name, :iconurl, :lastupdated)"; 
     77                        stmt_upd_poster.text = "replace into " + CommonData.TABLE_POSTER + " (screenname, name, iconurl, lastupdated) values (:screenname, :name, :iconurl, :lastupdated)"; 
    7878                         
    7979                        var key : String; 
    8080                        for (key in postermap) { 
    8181                                val = postermap[key]; 
    82                                 stmt_upd_poster.parameters[":posterid"] = key; 
     82                                stmt_upd_poster.parameters[":screenname"] = key; 
    8383                                stmt_upd_poster.parameters[":name"] = val.postername; 
    8484                                stmt_upd_poster.parameters[":iconurl"] = StatusUtility.compressIconUrl(val.iconurl); 
     
    9696                                var stmt_rep_following : SQLStatement = new SQLStatement(); 
    9797                                stmt_rep_following.sqlConnection = conn; 
    98                                 stmt_rep_following.text = "replace into " + CommonData.TABLE_FOLLOWING + " (userid, posterid, lastupdated) values (:userid, :posterid, :lastupdated)"; 
     98                                stmt_rep_following.text = "replace into " + CommonData.TABLE_FOLLOWING + " (idfrom, idto, lastupdated) values (:idfrom, :idto, :lastupdated)"; 
    9999                                 
    100100                                for (key in postermap) { 
    101                                         stmt_rep_following.parameters[":userid"] = CommonData.configxml.login.userid.toString(); 
    102                                         stmt_rep_following.parameters[":posterid"] = key; 
     101                                        stmt_rep_following.parameters[":idfrom"] = CommonData.configxml.login.userid.toString(); 
     102                                        stmt_rep_following.parameters[":idto"] = key; 
    103103                                        stmt_rep_following.parameters[":lastupdated"] = now; 
    104104                                        try { 
  • air/TLife/trunk/src/uwi/thread/TimelineThread.as

    r2589 r2621  
    8888                                        " where posterid in (select posterid from " +  
    8989                                        CommonData.TABLE_FOLLOWING +  
    90                                         " where userid = '" + StringUtility.escapeSQL(CommonData.configxml.login.userid) + "')" + 
     90                                        " where idfrom = '" + StringUtility.escapeSQL(CommonData.configxml.login.userid) + "')" + 
    9191                                        (tabinfo.rule != "" ? (" and (" + tabinfo.rule + ")") : "") +  
    9292                                        sqlsuffix; 
     
    136136                        var ar : Array = ret.data; 
    137137                        if (ar != null) { 
    138                                 var tempdbstmap : Object = { }; 
     138                                var posteridset : Object = { }; 
    139139                                dbstmap = { }; 
    140140                                var manageunread : int = Utility.getNumber("manageunread", tabname); 
     
    143143                                        if (obj.postedtime != null) obj.postedtime = CommonData.dateformatter_timeline.format(obj.postedtime); 
    144144                                         
    145 //                                      dbstmap[obj.posterid] = null; 
    146                                         tempdbstmap[obj.posterid] = null; 
     145                                        posteridset[obj.posterid] = null; 
    147146                                         
    148147                                        if (manageunread == 1) { 
     
    188187                                 
    189188                                pe = new ParallelExecutor(); 
    190 //                              for (var posterid : String in dbstmap) { 
    191                                 for (var posterid : String in tempdbstmap) { 
    192                                         var sql : String = "select name, iconurl from " + CommonData.TABLE_POSTER + " where posterid = '" + StringUtility.escapeSQL(posterid) + "'"; 
     189                                for (var posterid : String in posteridset) { 
     190                                        var sql : String = "select name, iconurl from " + CommonData.TABLE_POSTER + " where screenname = '" + StringUtility.escapeSQL(posterid) + "'"; 
    193191                                        var ddbst : DBSelectThread = new DBSelectThread(conn, sql); 
    194192                                        dbstmap[posterid] = ddbst; 
  • air/TLife/trunk/src/uwi/thread/event/ContextMenuItemEventThread.as

    r2589 r2621  
    3737         
    3838        /** 
    39          * ... 
     39         * 右クリックメニューイベントThread 
    4040         * @author Uwi 
    4141         */ 
  • air/TLife/trunk/src/uwi/thread/event/DataGridEventThread.as

    r2546 r2621  
    7979                private function onKeyDown(e : KeyboardEvent) : void 
    8080                { 
     81                        trace(e.charCode); 
    8182                        if (datagrid.selectedIndex != -1){ 
    8283                                switch(e.keyCode) { 
  • air/TLife/trunk/src/uwi/thread/event/DataGridRoutineThread.as

    r2546 r2621  
    5252                        if (Utility.getNumber("manageunread", Application.application.tabbar.selectedTabName) == 1) { 
    5353                                // 選択したpostをすべて既読に 
    54                                 for each(var ind : int in datagrid.selectedIndices)
     54                                for each(var ind : int in datagrid.selectedIndices)
    5555                                        datagrid.mark(index, false); 
    5656                                } 
  • air/TLife/trunk/src/uwi/thread/event/IncrementalSearchThread.as

    r2589 r2621  
    1313        import uwi.ui.DataGridEx; 
    1414        import uwi.util.CommonData; 
     15        import uwi.util.LazyExecutor; 
    1516         
    1617        /** 
     
    2526                private var query : String = ""; 
    2627                private var timeoutManager : Timer = null; 
     28                private var le : LazyExecutor; 
    2729                 
    2830                // 0 : none 
     
    4850                        } 
    4951                        mode = 0; 
     52                        le = new LazyExecutor(function(func : Function) : void { 
     53                                Application.application.timeline.filterFunction = func; 
     54                                Application.application.timeline.refresh(); 
     55                        }, 200); 
    5056                } 
    5157                 
     
    120126                                                case Keyboard.ESCAPE: 
    121127                                                        eraseQuery(); 
    122                                                         Application.application.timeline.filterFunction = null; 
    123                                                         Application.application.timeline.refresh(); 
    124                                                         mode = 0; 
    125                                                         break; 
    126                                                 case Keyboard.BACKSPACE: 
    127                                                         if (query.length <= 1) { 
    128                                                                 eraseQuery(); 
    129                                                                 Application.application.timeline.filterFunction = null; 
    130                                                                 Application.application.timeline.refresh(); 
    131                                                                 mode = 0; 
    132                                                         }else{ 
    133                                                                 query = query.substring(0, query.length - 1); 
    134                                                                 CommonData.mainstatusbar.write(STR_SEARCH[mode] + query, DEPTH_IST); 
    135                                                                 Application.application.timeline.filterFunction = function(item : Object) : Boolean { 
     128                                                        le.impulse(null); 
     129                                                        mode = 0; 
     130                                                        break; 
     131                                                case Keyboard.BACKSPACE: 
     132                                                        if (query.length <= 1) { 
     133                                                                eraseQuery(); 
     134                                                                le.impulse(null); 
     135                                                                mode = 0; 
     136                                                        }else{ 
     137                                                                query = query.substring(0, query.length - 1); 
     138                                                                CommonData.mainstatusbar.write(STR_SEARCH[mode] + query, DEPTH_IST); 
     139                                                                le.impulse(function(item : Object) : Boolean { 
    136140                                                                        // 前方一致 
    137141                                                                        return item.posterid.substring(0, query.length) == query; 
    138                                                                 } 
    139                                                                 Application.application.timeline.refresh(); 
    140                                                         } 
    141                                                         break; 
    142                                                 default: 
    143                                                         if (e.charCode >= 0x20 && e.charCode < 0x7f) { 
    144                                                                 query += String.fromCharCode(e.charCode); 
    145                                                                 CommonData.mainstatusbar.write(STR_SEARCH[mode] + query, DEPTH_IST); 
    146                                                                 Application.application.timeline.filterFunction = function(item : Object) : Boolean { 
     142                                                                }); 
     143                                                        } 
     144                                                        break; 
     145                                                default: 
     146                                                        if (e.charCode >= 0x20 && e.charCode < 0x7f) { 
     147                                                                query += String.fromCharCode(e.charCode); 
     148                                                                CommonData.mainstatusbar.write(STR_SEARCH[mode] + query, DEPTH_IST); 
     149                                                                le.impulse(function(item : Object) : Boolean { 
    147150                                                                        // 前方一致 
    148151                                                                        return item.posterid.substring(0, query.length) == query; 
    149                                                                 } 
    150                                                                 Application.application.timeline.refresh(); 
    151                                                         } 
    152                                                         break; 
    153                                         } 
    154                                         break; 
     152                                                                }); 
     153                                                        } 
     154                                                        break; 
     155                                        } 
     156                                        break; 
     157                                case 3: 
     158                                        switch(e.keyCode) { 
     159                                                case Keyboard.ESCAPE: 
     160                                                        eraseQuery(); 
     161                                                        le.impulse(null); 
     162                                                        mode = 0; 
     163                                                        break; 
     164                                                case Keyboard.BACKSPACE: 
     165                                                        if (query.length <= 1) { 
     166                                                                eraseQuery(); 
     167                                                                le.impulse(null); 
     168                                                                mode = 0; 
     169                                                        }else{ 
     170                                                                query = query.substring(0, query.length - 1); 
     171                                                                CommonData.mainstatusbar.write(STR_SEARCH[mode] + query, DEPTH_IST); 
     172                                                                le.impulse(function(item : Object) : Boolean { 
     173                                                                        // 中間一致 
     174                                                                        return item.content.indexOf(query) != -1; 
     175                                                                }); 
     176                                                        } 
     177                                                        break; 
     178                                                default: 
     179                                                        if (e.charCode >= 0x20 && e.charCode < 0x7f) { 
     180                                                                query += String.fromCharCode(e.charCode); 
     181                                                                CommonData.mainstatusbar.write(STR_SEARCH[mode] + query, DEPTH_IST); 
     182                                                        } 
     183                                                        le.impulse(function(item : Object) : Boolean { 
     184                                                                // 中間一致 
     185                                                                return item.content.indexOf(query) != -1; 
     186                                                        }); 
     187                                                        break; 
     188                                        } 
     189                                        break; 
     190                                default: break; 
     191                                } 
     192                        } 
     193                        next(run); 
     194                } 
     195                 
     196                private function filterIncrementally(e : KeyboardEvent) : void 
     197                { 
     198                        switch(mode) { 
     199                                case 2: 
    155200                                case 3: 
    156201                                        switch(e.keyCode) { 
     
    181226                                                                query += String.fromCharCode(e.charCode); 
    182227                                                                CommonData.mainstatusbar.write(STR_SEARCH[mode] + query, DEPTH_IST); 
    183                                                                  
    184                                                                 Application.application.timeline.filterFunction = function(item : Object) : Boolean { 
    185                                                                         // 中間一致 
    186                                                                         return item.content.indexOf(query) != -1; 
    187                                                                 } 
    188                                                                 Application.application.timeline.refresh(); 
    189                                                         } 
    190                                                         break; 
    191                                         } 
    192                                         break; 
    193                                 default: break; 
    194                                 } 
     228                                                        } 
     229                                                        Application.application.timeline.filterFunction = function(item : Object) : Boolean { 
     230                                                                // 中間一致 
     231                                                                return item.content.indexOf(query) != -1; 
     232                                                        } 
     233                                                        Application.application.timeline.refresh(); 
     234                                                        break; 
     235                                        } 
     236                                        break; 
     237                                default: 
     238                                        break; 
    195239                        } 
    196                         next(run); 
    197240                } 
    198241                 
  • air/TLife/trunk/src/uwi/thread/event/PostEventThread.as

    r2589 r2621  
    148148                        // TODO 複数reply時のin_reply_to_status_idのとりかた 
    149149                        var tpt : TwitterPostThread = new TwitterPostThread( 
    150                                 "http://twitter.com/statuses/update.xml", 
     150                                "http://twitter.com/statuses/update.json", 
    151151                                "status=" + decodeURI(postarea.text + footer) +  
    152152                                (CommonData.in_reply_to_status_id != "" ? "&in_reply_to_status_id=" + CommonData.in_reply_to_status_id : "") + 
  • air/TLife/trunk/src/uwi/twitter/TwitterAPI.as

    r2531 r2621  
    1212                public static function fav(postid : String, onSucceed : Function = null) : void 
    1313                { 
    14                         new TwitterPostThread("http://twitter.com/favorites/create/" + postid + ".xml", "id=" + postid, "Fav", onSucceed).start(); 
     14                        new TwitterPostThread("http://twitter.com/favorites/create/" + postid + ".json", "id=" + postid, "Fav", onSucceed).start(); 
    1515                } 
    1616                 
    1717                public static function favdel(postid : String, onSucceed : Function = null) : void 
    1818                { 
    19                         new TwitterPostThread("http://twitter.com/favorites/destroy/" + postid + ".xml", "id=" + postid, "Fav削除", onSucceed).start(); 
     19                        new TwitterPostThread("http://twitter.com/favorites/destroy/" + postid + ".json", "id=" + postid, "Fav削除", onSucceed).start(); 
    2020                } 
    2121                 
    2222                public static function follow(posterid : String, onSucceed : Function = null) : void 
    2323                { 
    24                         new TwitterPostThread("http://twitter.com/friendships/create/" + posterid + ".xml", "id=" + posterid, "follow", onSucceed).start(); 
     24                        new TwitterPostThread("http://twitter.com/friendships/create/" + posterid + ".json", "id=" + posterid, "follow", onSucceed).start(); 
    2525                } 
    2626                 
    2727                public static function remove(posterid : String, onSucceed : Function = null) : void 
    2828                { 
    29                         new TwitterPostThread("http://twitter.com/friendships/destroy/" + posterid + ".xml", "id=" + posterid, "remove", onSucceed).start(); 
     29                        new TwitterPostThread("http://twitter.com/friendships/destroy/" + posterid + ".json", "id=" + posterid, "remove", onSucceed).start(); 
    3030                } 
    3131                 
    3232                public static function block(posterid : String, onSucceed : Function = null) : void 
    3333                { 
    34                         new TwitterPostThread("http://twitter.com/blocks/create/" + posterid + ".xml", "id=" + posterid, "block", onSucceed).start(); 
     34                        new TwitterPostThread("http://twitter.com/blocks/create/" + posterid + ".json", "id=" + posterid, "block", onSucceed).start(); 
    3535                } 
    3636                 
    3737                public static function blockdel(posterid : String, onSucceed : Function = null) : void 
    3838                { 
    39                         new TwitterPostThread("http://twitter.com/blocks/destroy/" + posterid + ".xml", "id=" + posterid, "blockdel", onSucceed).start(); 
     39                        new TwitterPostThread("http://twitter.com/blocks/destroy/" + posterid + ".json", "id=" + posterid, "blockdel", onSucceed).start(); 
    4040                } 
    4141        } 
  • air/TLife/trunk/src/uwi/twitter/TwitterBitStatusGetThread.as

    r2501 r2621  
    11package uwi.twitter  
    22{ 
     3        import com.adobe.serialization.json.JSON; 
    34        import flash.net.URLRequest; 
    45        import flash.net.URLRequestMethod; 
     6        import mx.utils.ObjectUtil; 
    57        import org.libspark.thread.Thread; 
    68        import org.libspark.thread.threads.net.URLLoaderThread; 
     
    1214        import uwi.thread.StatusInsertThread; 
    1315        import uwi.util.CommonData; 
     16        import uwi.util.StatusUtility; 
    1417         
    1518        /** 
     
    2326                 
    2427                private var s : Status = null; 
    25                 private var follower : int; 
     28                private var nfollowers : int; 
    2629                private var posterid : String; 
    2730                 
     
    2932                { 
    3033                        this.posterid = posterid; 
    31                         var req : URLRequest = new URLRequest("http://twitter.com/statuses/show/" + postid + ".xml"); 
     34                        var req : URLRequest = new URLRequest("http://twitter.com/statuses/show/" + postid + ".json"); 
    3235                        req.method = URLRequestMethod.GET; 
    3336                        ult = new URLLoaderThread(req); 
     
    4447                private function onGetComplete() : void 
    4548                { 
    46                         var status : XML = XML(ult.loader.data); 
    47                         // "Sun Mar 08 00:03:44 +0000 2009" 
    48                         var datestr : String = status.created_at; 
    49                         // "Sun Mar 08 00:03:44 UTC+0000 2009" にすればDateで読める。 
    50                         var postedtime : Date = new Date(datestr.substring(0, 20) + "UTC" + datestr.substring(20)); 
     49                        var status : Object = JSON.decode(ult.loader.data); 
     50//                      nfollowers = status.user.followers_count; 
    5151                         
    52                         follower = int(status.user.followers_count); 
    53                          
    54                         s = new Status(status.id, status.user.name, status.user.screen_name, status.text, status.in_reply_to_status_id, postedtime, status.user.profile_image_url, status.favorited == "true"); 
     52                        s = new Status( 
     53                                status.id,  
     54                                status.user.name,  
     55                                status.user.screen_name,  
     56                                status.text,  
     57                                status.in_reply_to_status_id || "0",  
     58                                StatusUtility.toDate(status.created_at), 
     59                                status.user.profile_image_url, 
     60                                status.favorited 
     61                                ); 
    5562                        lrt = new LinkResolveThread(s.content); 
    5663                        lrt.start(); 
     
    7481                        se.addThread(pe1); 
    7582                         
    76                         var args : Array = [ { follower : follower, posterid : posterid } ]; 
     83                        /* 
     84                        var args : Array = [ { nfollowers : nfollowers, posterid : posterid } ]; 
    7785                        var sql : String = "update " + CommonData.TABLE_POSTER + " set" +  
    78                                 " follower = :follower" +  
     86                                " nfollowers = :nfollowers" +  
    7987                                " where posterid = :posterid"; 
    8088                        pe2.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sql, args)); 
    8189                        pe2.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sql, args)); 
    8290                        se.addThread(pe2); 
    83                                  
     91                        */ 
     92                         
    8493                        se.start(); 
    8594                        se.join(); 
  • air/TLife/trunk/src/uwi/twitter/TwitterBitUserInfoGetThread.as

    r2438 r2621  
    11package uwi.twitter  
    22{ 
     3        import com.adobe.serialization.json.JSON; 
    34        import flash.errors.IOError; 
    45        import flash.events.HTTPStatusEvent; 
     
    2425                { 
    2526                        this.userid = userid; 
    26                         var req : URLRequest = new URLRequest("http://twitter.com/users/show/" + userid + ".xml"); 
     27                        var req : URLRequest = new URLRequest("http://twitter.com/users/show/" + userid + ".json"); 
    2728                        req.method = URLRequestMethod.GET; 
    2829                        ult = new URLLoaderThread(req); 
     
    5253                private function onGetComplete() : void 
    5354                { 
    54                         var user : XML = XML(ult.loader.data); 
     55                        var user : Object = JSON.decode(ult.loader.data); 
    5556                        var pe : ParallelExecutor = new ParallelExecutor(); 
    56                         var sql : String = "replace into " + CommonData.TABLE_POSTER + " (posterid, id, name, url, iconurl, protected, following, follower, numpost, description, lastupdated) values" +  
    57                                 " (:posterid, :id, :name, :url, :iconurl, :protected_, :following, :follower, :numpost, :description, :lastupdated)"; 
     57                        var sql : String = "replace into " + CommonData.TABLE_POSTER + " (screenname, id, name, url, iconurl, protected, createdat, nfriends, nfollowers, nstatuses, description, lastpost, lastposttime, lastupdated) values" +  
     58                                " (:screenname, :id, :name, :url, :iconurl, :protected_, :createdat, :nfriends, :nfollowers, :nstatuses, :description, :lastpost, :lastposttime, :lastupdated)"; 
    5859                        var args : Array = [{ 
    59                                 posterid : user.screen_name.toString(), 
    60                                 id : user.id.toString(), 
    61                                 url : user.url.toString(), 
    62                                 name : user.name.toString(), 
    63                                 iconurl : StatusUtility.compressIconUrl(user.profile_image_url.toString()), 
    64                                 protected_ : user.protected == "true", 
    65                                 following : user.friends_count.toString(), 
    66                                 follower : user.followers_count.toString(), 
    67                                 numpost : user.statuses_count.toString(), 
    68                                 description : user.description.toString(), 
     60                                screenname : user.screen_name, 
     61                                id : user.id, 
     62                                url : user.url, 
     63                                name : user.name, 
     64                                iconurl : StatusUtility.compressIconUrl(user.profile_image_url), 
     65                                protected_ : user.protected, 
     66                                createdat : StatusUtility.toDate(user.created_at), 
     67                                nfriends : user.friends_count, 
     68                                nfollowers : user.followers_count, 
     69                                nstatuses : user.statuses_count, 
     70                                description : user.description, 
     71                                lastpost : user.status ? user.status.text : null, 
     72                                lastposttime : user.status ? StatusUtility.toDate(user.status.created_at) : 0, 
    6973                                lastupdated : new Date() 
    7074                        }]; 
  • air/TLife/trunk/src/uwi/twitter/TwitterDirectMessageGetThread.as

    r2438 r2621  
    9191                        var args : Array = []; 
    9292                        for (var posterid : String in followers) { 
    93                                 args.push( { posterid : posterid, follower : followers[posterid] } ); 
     93                                args.push( { screenname : posterid, nfollowers : followers[posterid] } ); 
    9494                        } 
    9595                        var sql : String = "update " + CommonData.TABLE_POSTER + " set" +  
    96                                 " follower = :follower" +  
    97                                 " where posterid = :posterid"; 
     96                                " nfollowers = :nfollowers" +  
     97                                " where screenname = :screenname"; 
    9898                        pe2.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sql, args)); 
    9999                        pe2.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sql, args)); 
  • air/TLife/trunk/src/uwi/twitter/TwitterFriendsInfoGetThread.as

    r2514 r2621  
    11package uwi.twitter  
    22{ 
     3        import com.adobe.serialization.json.JSON; 
    34        import flash.data.SQLResult; 
    45        import flash.net.URLRequest; 
    56        import flash.net.URLRequestMethod; 
     7        import mx.utils.ObjectUtil; 
    68        import org.libspark.thread.Thread; 
    79        import org.libspark.thread.threads.net.URLLoaderThread; 
     
    2729                private var pe : ParallelExecutor = null; 
    2830                private var friends : Boolean; 
     31                private var timeout_ : int; 
    2932 
    30                 public function TwitterFriendsInfoGetThread(userid : String, friends : Boolean = true)  
     33                public function TwitterFriendsInfoGetThread(userid : String, friends : Boolean = true, timeout_ : int = 0)  
    3134                { 
    3235                        this.userid = userid; 
    3336                        this.friends = friends; 
     37                        this.timeout_ = timeout_; 
    3438                } 
    3539                 
    3640                protected override function run() : void 
    3741                { 
     42                        // 件数を取得 
    3843                        dbst = new DBSupplyThread( 
    3944                                CommonData.db_memory.conn, 
    4045                                // TODO 最近という条件追加 
    41                                 "select " + (friends ? "following" : "follower") + " from " + CommonData.TABLE_POSTER + " where posterid = '" + StringUtility.escapeSQL(userid) + "'", 
    42                                 new TwitterBitUserInfoGetThread(userid) 
     46                                "select " + (friends ? "nfriends" : "nfollowers") + " from " + CommonData.TABLE_POSTER + " where screenname = '" + StringUtility.escapeSQL(userid) + "'", 
     47                                new TwitterBitUserInfoGetThread(userid), 
     48                                function(o : Object) : Boolean { return o[friends ? "nfriends" : "nfollowers"] != -1; } 
    4349                                ); 
    4450                        dbst.start(); 
    45                         dbst.join(); 
     51                        dbst.join(timeout_); 
    4652                        next(onBitGetComplete); 
     53                        timeout(onTimeout); 
    4754                        interrupted(onInterrupted); 
    4855                } 
     
    5158                { 
    5259                        if(dbst.data != null){ 
    53                                 var ct : int = dbst.data[friends ? "following" : "follower"]; 
     60                                var ct : int = dbst.data[friends ? "nfriends" : "nfollowers"]; 
     61                                trace("ct : " + ct); 
    5462                                var pageend : int = (ct + 99) / 100; 
    5563                                 
    5664                                pe = new ParallelExecutor(); 
    57                                 var baseurl : String = "http://twitter.com/statuses/" + (friends ? "friends" : "followers") + "/" + userid + ".xml"; 
     65                                var baseurl : String = "http://twitter.com/statuses/" + (friends ? "friends" : "followers") + "/" + userid + ".json"; 
    5866                                for (var i : int = 1; i <= pageend; i++) { 
    5967                                        var req : URLRequest = new URLRequest(baseurl + "?page=" + i); 
     
    6270                                } 
    6371                                pe.start(); 
    64                                 pe.join(); 
     72                                pe.join(timeout_); 
    6573                                next(onGetComplete); 
     74                                timeout(onTimeout); 
    6675                                interrupted(onInterrupted); 
    6776                        } 
     
    7079                private function onGetComplete() : void 
    7180                { 
    72                         var sql : String = "replace into " + CommonData.TABLE_POSTER + " (posterid, id, name, url, iconurl, protected, follower, description, lastupdated) values" +  
    73                                 " (:posterid, :id, :name, :url, :iconurl, :protected, :follower, :description, :lastupdated)"; 
     81                        var userid : String = CommonData.configxml.login.userid; 
     82                        var now : Date = new Date(); 
     83                         
     84                        // POSTERに追加 
     85                        var sql : String = "replace into " + CommonData.TABLE_POSTER + " (screenname, id, name, url, iconurl, protected, createdat, nfriends, nfollowers, nstatuses, description, lastpost, lastposttime, lastupdated) values" +  
     86                                " (:screenname, :id, :name, :url, :iconurl, :protected_, :createdat, :nfriends, :nfollowers, :nstatuses, :description, :lastpost, :lastposttime, :lastupdated)"; 
     87                        // FOLLOWINGに追加 
     88                        var sqlf : String = "replace into " + CommonData.TABLE_FOLLOWING + " (idfrom, idto, lastupdated) values" +  
     89                                " (:idfrom, :idto, :lastupdated)"; 
     90                        // 全削除 
     91                        var sqldel : String = "delete from " + CommonData.TABLE_FOLLOWING + " where " + (friends ? "idfrom" : "idto") +  
     92                                " = '" + StringUtility.escapeSQL(userid) + "'"; 
     93                                 
    7494                        var args : Array = []; 
    75                         var now : Date = new Date(); 
     95                        var argsf : Array = []; 
     96                         
    7697                        for (var i : int = 0; i < pe.numThreads; i++) { 
    77                                 var users : XML = XML((pe.getThreadAt(i) as URLLoaderThread).loader.data); 
    78                                 for each (var user : XML in users.user) { 
     98                                var users : Array = JSON.decode((pe.getThreadAt(i) as URLLoaderThread).loader.data) as Array; 
     99                                for each (var user : Object in users) { 
     100//                                      trace(ObjectUtil.toString(user)); 
    79101                                        args.push({ 
    80                                                 posterid : user.screen_name.toString(), 
    81                                                 id : user.id.toString(), 
    82                                                 name : user.name.toString(), 
    83                                                 url : user.url.toString(), 
    84                                                 protected : user.protected == "true", 
    85                                                 iconurl : StatusUtility.compressIconUrl(user.profile_image_url.toString()), 
    86                                                 follower : user.followers_count.toString(), 
    87                                                 description : user.description.toString(), 
     102                                                screenname : user.screen_name, 
     103                                                id : user.id, 
     104                                                url : user.url, 
     105                                                name : user.name, 
     106                                                iconurl : StatusUtility.compressIconUrl(user.profile_image_url), 
     107                                                protected_ : user.protected, 
     108                                                createdat : StatusUtility.toDate(user.created_at), 
     109                                                nfriends : user.friends_count, 
     110                                                nfollowers : user.followers_count, 
     111                                                nstatuses : user.statuses_count, 
     112                                                description : user.description, 
     113                                                lastpost : user.status ? user.status.text : null, 
     114                                                lastposttime : user.status ? StatusUtility.toDate(user.status.created_at) : 0, 
    88115                                                lastupdated : now 
    89116                                        }); 
     117                                        if (friends) { 
     118                                                argsf.push( { 
     119                                                        idfrom : userid, 
     120                                                        idto : user.screen_name, 
     121                                                        lastupdated : now 
     122                                                }); 
     123                                        }else { 
     124                                                argsf.push( { 
     125                                                        idfrom : user.screen_name, 
     126                                                        idto : userid, 
     127                                                        lastupdated : now 
     128                                                }); 
     129                                        } 
    90130                                } 
    91131                        } 
    92132                         
    93                         pe = new ParallelExecutor(); 
    94                         pe.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sql, args)); 
    95                         pe.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sql, args)); 
    96                         pe.start(); 
    97                         pe.join(); 
     133                        var se : SerialExecutor = new SerialExecutor(); 
     134                        var pe1 : ParallelExecutor = new ParallelExecutor(); 
     135                        pe1.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sql, args)); 
     136                        pe1.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sql, args)); 
     137                        pe1.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sqldel)); 
     138                        pe1.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sqldel)); 
     139                        se.addThread(pe1); 
     140                        var pe2 : ParallelExecutor = new ParallelExecutor(); 
     141                        pe2.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sqlf, argsf)); 
     142                        pe2.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sqlf, argsf)); 
     143                        se.addThread(pe2); 
     144                        se.start(); 
     145                        se.join(); 
     146                } 
     147                 
     148                private function onTimeout() : void 
     149                { 
     150                        if (dbst != null) dbst.interrupt(); 
     151                        if (pe != null) pe.interrupt(); 
    98152                } 
    99153                 
  • air/TLife/trunk/src/uwi/twitter/TwitterRateLimitStatusGetThread.as

    r2438 r2621  
    1414                public function TwitterRateLimitStatusGetThread  
    1515                { 
    16                         var req : URLRequest = new URLRequest("http://twitter.com/account/rate_limit_status.xml"); 
     16                        var req : URLRequest = new URLRequest("http://twitter.com/account/rate_limit_status.json"); 
    1717                        req.method = URLRequestMethod.GET; 
    1818                        super(req); 
  • air/TLife/trunk/src/uwi/twitter/TwitterScrapeThread.as

    r2546 r2621  
    99        import org.libspark.thread.utils.ParallelExecutor; 
    1010        import org.libspark.thread.utils.SerialExecutor; 
    11         import uwi.bean.PageData; 
    1211        import uwi.bean.Status; 
    1312        import uwi.db.SimpleTransactionThread; 
     
    2524         */ 
    2625        public class TwitterScrapeThread extends StatusGetBaseThread { 
    27                 private var pagedata : PageData
     26                private var pagedata : Object
    2827                 
    2928                private var pelrt : ParallelExecutor; 
     
    103102                        if (pagedata != null) { 
    104103                                var sql : String = "update " + CommonData.TABLE_POSTER + " set" +  
    105                                         " following = " + pagedata.following + ", " +  
    106                                         " follower = " + pagedata.follower + ", " +  
    107                                         " numpost = " + pagedata.update
    108                                         " where posterid = '" + StringUtility.escapeSQL((_posterid != null ? _posterid : CommonData.configxml.login.userid)) + "'"; 
     104                                        " nfriends = " + pagedata.nfriends + ", " +  
     105                                        " nfollowers = " + pagedata.nfollowers + ", " +  
     106                                        " nstatuses = " + pagedata.nstatuses
     107                                        " where screenname = '" + StringUtility.escapeSQL((_posterid != null ? _posterid : CommonData.configxml.login.userid)) + "'"; 
    109108                                pe2.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sql)); 
    110109                                pe2.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sql)); 
  • air/TLife/trunk/src/uwi/twitter/TwitterTimelineGetThread.as

    r2493 r2621  
    11package uwi.twitter  
    22{ 
     3        import com.adobe.serialization.json.JSON; 
    34        import flash.net.URLRequest; 
    45        import flash.net.URLRequestMethod; 
     
    3233                 *      ""ならreplyを得る。取得後の挙動はuser_timelineと同じ。 
    3334                 *      nullなら自分のtimelineを取得 
     35                 * TODO check 
    3436                 */ 
    3537                public function TwitterTimelineGetThread(posterid : String = null, count : int = 20, pageend : int = 1)  
     
    4446                        if(_posterid == " REPLIES"){ 
    4547                                _posterid = "REPLIES"; 
    46                                 baseurl = "http://twitter.com/statuses/replies.xml"; 
     48                                baseurl = "http://twitter.com/statuses/replies.json"; 
    4749                        }else { 
    48                                 baseurl = _posterid != null ? ("http://twitter.com/statuses/user_timeline/" + _posterid + ".xml") : "http://twitter.com/statuses/friends_timeline.xml"; 
     50                                baseurl = _posterid != null ? ("http://twitter.com/statuses/user_timeline/" + _posterid + ".json") : "http://twitter.com/statuses/friends_timeline.json"; 
    4951                        } 
    5052                         
     
    6870                         
    6971                        for (var i : int = 0; i < pe.numThreads; i++) { 
    70                                 var timeline : XML = XML((pe.getThreadAt(i) as URLLoaderThread).loader.data); 
    71                                 for each(var status : XML in timeline.status) { 
     72                                var timeline : Array = JSON.decode((pe.getThreadAt(i) as URLLoaderThread).loader.data); 
     73                                for each(var status : Object in timeline) { 
    7274                                        // "Sun Mar 08 00:03:44 +0000 2009" 
    7375                                        var datestr : String = status.created_at; 
     
    7577                                        var postedtime : Date = new Date(datestr.substring(0, 20) + "UTC" + datestr.substring(20)); 
    7678                                         
    77                                         followers[status.user.screen_name] = int(status.user.followers_count)
    78                                         var s : Status = new Status(status.id, status.user.name, status.user.screen_name, status.text, status.in_reply_to_status_id, postedtime, status.user.profile_image_url, status.favorited == "true"); 
     79                                        followers[status.user.screen_name] = status.user.followers_count
     80                                        var s : Status = new Status(status.id, status.user.name, status.user.screen_name, status.text, status.in_reply_to_status_id || "0", postedtime, status.user.profile_image_url, status.favorited); 
    7981                                        pelrt.addThread(new LinkResolveThread(s.content)); 
    8082                                         
     
    106108                        var args : Array = []; 
    107109                        for (var pid : String in followers) { 
    108                                 args.push( { posterid : pid, follower : followers[pid] } ); 
     110                                args.push( { screenname : pid, nfollowers : followers[pid] } ); 
    109111                        } 
    110112                        var sql : String = "update " + CommonData.TABLE_POSTER + " set" +  
    111                                 " follower = :follower" +  
    112                                 " where posterid = :posterid"; 
     113                                " nfollowers = :nfollowers" +  
     114                                " where screenname = :screenname"; 
    113115                        pe2.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sql, args)); 
    114116                        pe2.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sql, args)); 
  • air/TLife/trunk/src/uwi/ui/DataGridEx.as

    r2519 r2621  
    3030                public function mark(index : int, unread : Boolean) : void 
    3131                { 
     32                        if (index < 0 || index >= dataProvider.length)return; 
    3233                        var item : Object = dataProvider.getItemAt(index); 
    3334                        item.unread = unread; 
  • air/TLife/trunk/src/uwi/ui/TimelineRenderer.as

    r2546 r2621  
    4545                        */ 
    4646                } 
    47                  
    48                 public override function validateNow() : void 
    49                 { 
    50 //                      super.validateNow(); 
    51 //                      trace("validateNow!"); 
    52                 } 
    5347        } 
    5448         
  • air/TLife/trunk/src/uwi/ui/complete/CompleteThread.as

    r2589 r2621  
    2222         
    2323        /** 
    24          * ... 
     24         * 補完汎用Thread 
    2525         * @author Uwi 
    2626         */ 
  • air/TLife/trunk/src/uwi/ui/complete/UserIDCompletionListSupplyThread.as

    r2453 r2621  
    2222                protected override function run() : void  
    2323                { 
    24                         dbst = new DBSelectThread(CommonData.db_memory.conn, "select posterid from " + CommonData.TABLE_POSTER); 
     24                        dbst = new DBSelectThread(CommonData.db_memory.conn, "select screenname from " + CommonData.TABLE_POSTER); 
    2525                        dbst.start(); 
    2626                        dbst.join(); 
     
    3535                                var temp : Array = []; 
    3636                                for each(var obj : Object in ar) { 
    37                                         temp.push(obj.posterid); 
     37                                        temp.push(obj.screenname); 
    3838                                } 
    3939                                temp.sort(); 
  • air/TLife/trunk/src/uwi/ui/globalconfig/GlobalConfig.mxml

    r2546 r2621  
    66        height="400" 
    77        layout="absolute" 
    8         systemChrome="none
    9         transparent="true" 
     8        systemChrome="standard
     9        transparent="false" 
    1010        type="utility" 
    1111        paddingLeft="4" 
  • air/TLife/trunk/src/uwi/ui/globalconfig/GlobalConfigEventThread.as

    r2531 r2621  
    1414        import uwi.thread.InitialMovementThread; 
    1515        import uwi.util.CommonData; 
     16        import uwi.util.LazyExecutor; 
    1617        import uwi.util.Utility; 
    1718         
     
    2324        { 
    2425                private var gc : GlobalConfig; 
     26                private var le : LazyExecutor; 
    2527                 
    2628                public function GlobalConfigEventThread(gc : GlobalConfig)  
    2729                { 
    2830                        this.gc = gc; 
     31                        le = new LazyExecutor(onChange, 200); 
    2932                } 
    3033                 
     
    3235                { 
    3336                        if (gc.searchbox) { 
    34                                 event(gc.searchbox, Event.CHANGE, onChange); 
     37                                event(gc.searchbox, Event.CHANGE, function(e : Event) : void { le.impulse(); next(run); } ); 
    3538                        } 
    3639                        event(gc.tn1, FlexEvent.SHOW, onTN1Show); 
     
    4144                } 
    4245                 
    43                 private function onChange(e : Event) : void 
     46                private function onChange() : void 
    4447                { 
    4548                        gc.setvalue.filterFunction = function(item : Object) : Boolean { 
     
    4952                        }; 
    5053                        gc.setvalue.refresh(); 
    51                         next(run); 
    5254                } 
    5355                 
  • air/TLife/trunk/src/uwi/ui/multipletabbar/MultipleTabBar.as

    r2589 r2621  
    88         
    99        /** 
    10          * ... 
     10         * 多段TabBar 
    1111         * @author Uwi 
    1212         */ 
  • air/TLife/trunk/src/uwi/util/CommonData.as

    r2589 r2621  
    2525         
    2626        /** 
    27          * ... 
     27         * 共通変数、定数 
    2828         * @author Uwi 
    2929         */ 
  • air/TLife/trunk/src/uwi/util/FileIO.as

    r2159 r2621  
    55        import flash.filesystem.FileMode; 
    66        import flash.filesystem.FileStream; 
     7        import flash.utils.ByteArray; 
    78         
    89        /** 
     
    4445                } 
    4546                 
     47                public static function readToByteArray(file : File) : ByteArray 
     48                { 
     49                        var fs : FileStream = new FileStream(); 
     50                        fs.open(file, FileMode.READ); 
     51                        var ret : ByteArray = new ByteArray(); 
     52                        fs.readBytes(ret); 
     53                        fs.close(); 
     54                        return ret; 
     55                } 
    4656        } 
    4757         
  • air/TLife/trunk/src/uwi/util/StatusScraper.as

    r2589 r2621  
    44        import mx.formatters.DateFormatter; 
    55        import mx.utils.StringUtil; 
    6         import uwi.bean.PageData; 
    76        import uwi.bean.Status; 
    87         
     
    249248                } 
    250249                 
    251                 public static function scrapePageData(src : String) : PageData 
     250                public static function scrapePageData(src : String) : Object 
    252251                { 
    253252                        try { 
    254                                 var following : int = int(StringUtility.pinch(src, "<span id=\"following_count\" class=\"stats_count numeric\">", "</span>").replace(/,/g, "")); 
    255                                 var follower : int = int(StringUtility.pinch(src, "<span id=\"follower_count\" class=\"stats_count numeric\">", "</span>").replace(/,/g, "")); 
    256                                 var update : int = int(StringUtility.pinch(src, "<span id=\"update_count\" class=\"stats_count numeric\">", "</span>").replace(/,/g, "")); 
     253                                var nfriends : int = int(StringUtility.pinch(src, "<span id=\"following_count\" class=\"stats_count numeric\">", "</span>").replace(/,/g, "")); 
     254                                var nfollowers : int = int(StringUtility.pinch(src, "<span id=\"follower_count\" class=\"stats_count numeric\">", "</span>").replace(/,/g, "")); 
     255                                var nstatuses : int = int(StringUtility.pinch(src, "<span id=\"update_count\" class=\"stats_count numeric\">", "</span>").replace(/,/g, "")); 
    257256                        }catch (e : Error) { 
    258257                                Logger.stacktrace(e); 
     
    260259                        } 
    261260                         
    262                         return new PageData(following, follower, update)
     261                        return { nfriends : nfriends, nfollowers : nfollowers, nstatuses : nstatuses }
    263262                } 
    264263                 
  • air/TLife/trunk/src/uwi/util/StatusUtility.as

    r2531 r2621  
    188188                        return ret; 
    189189                } 
     190                 
     191                // "Sun Mar 08 00:03:44 +0000 2009" -> 
     192                // "Sun Mar 08 00:03:44 UTC+0000 2009" にすればDateで読める。 
     193                public static function toDate(str : String) : Date 
     194                { 
     195                        return new Date(str.substring(0, 20) + "UTC" + str.substring(20)); 
     196                } 
    190197        } 
    191198         
  • air/TLife/trunk/src/uwi/util/StringUtility.as

    r2533 r2621  
    212212                } 
    213213                 
     214                public static function escapeRegExp(str : String) : String 
     215                { 
     216                        str = str.replace(/([\^\$\\\.\*\+\?\(\)\[\]\{\}\|])/g, "\\$1"); 
     217                        return str; 
     218                } 
     219                 
    214220        } 
    215221} 
  • air/TLife/trunk/src/uwi/util/URLPostThread.as

    r2589 r2621  
    1010         
    1111        /** 
    12          * ... 
     12         * POST専用Thread 
    1313         * @author Uwi 
    1414         */