チェンジセット 2624

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

Post関連の重大なバグを修正
他諸々

ファイル:

凡例:

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

    r2623 r2624  
    33         
    44        <id>uwi.TLife</id>  
    5         <version>alpha15</version> 
     5        <version>alpha16</version> 
    66        <filename>TLife</filename> 
    77        <name>TLife</name>  
  • air/TLife/trunk/air/version.xml

    r2623 r2624  
    11<version> 
    2         <version>alpha15/version> 
     2        <version>alpha16/version> 
    33        <url>http://www.libspark.org/svn/air/TLife/trunk/air/TLife.air</url> 
    44</version>  
  • air/TLife/trunk/src/uwi/db/DBSelectThread.as

    r2621 r2624  
    2121                        this.name = "DBSelect"; 
    2222                        stmt = new SQLStatement(); 
    23                       Logger.debug("DBSelectThraed sql : " + sqltxt); 
     23//                    Logger.debug("DBSelectThraed sql : " + sqltxt); 
    2424                        stmt.sqlConnection = conn; 
    2525                        stmt.text = sqltxt; 
     
    3434                protected override function run() : void 
    3535                { 
    36 //                      Logger.debug("DBSelectThread begin sql : " + stmt.text); 
    3736                        result = null; 
    3837                        try { 
     
    4342                                Logger.error("DBSelectThread catch Error : " + e.message); 
    4443                        } 
    45 //                      Logger.debug("DBSelectThread end sql : " + stmt.text); 
    4644                        next(dummy); 
    4745                } 
     
    4947                private function dummy() : void 
    5048                { 
    51                          
    5249                } 
    5350                 
  • air/TLife/trunk/src/uwi/shortening/URLExpandThread.as

    r2589 r2624  
    4949                                if (rh.name == "Location") { 
    5050                                        this.expanded = rh.value; 
    51                                         Logger.debug("URLExpandThread Successed url : " + url + " -> " + expanded); 
     51                                        Logger.debug("URLExpandThread Succeeded url : " + url + " -> " + expanded); 
    5252                                        return; 
    5353                                } 
  • air/TLife/trunk/src/uwi/shortening/URLShortenThread.as

    r2589 r2624  
    5353                { 
    5454                        this.shortened = ult.loader.data; 
    55                         Logger.debug("URLShortenThread Successed url : " + ult.request.url + " -> " + shortened); 
     55                        Logger.debug("URLShortenThread Succeeded url : " + ult.request.url + " -> " + shortened); 
    5656                } 
    5757                 
  • air/TLife/trunk/src/uwi/thread/InitialMovementThread.as

    r2621 r2624  
    1010        import uwi.twitter.TwitterLoginThread; 
    1111        import uwi.twitter.TwitterMobileLoginThread; 
     12        import uwi.twitter.TwitterMobileLogoutThread; 
    1213        import uwi.util.CommonData; 
    1314        import uwi.util.TimerThread; 
     
    4041                protected override function run() : void 
    4142                { 
     43                        // ログイン中は無効 
    4244                        if (CommonData.state == 10) return; 
     45                         
     46                        // 自動再ログインスレッドをリセット 
    4347                        if (CommonData.art != null) { 
    4448                                CommonData.art.interrupt(); 
     
    5559                         
    5660                        s = getTimer(); 
     61                        var se : SerialExecutor = new SerialExecutor(); 
     62                        // ログインしていたらログアウトする 
     63                        if (CommonData.state == 1) { 
     64                                se.addThread(new TwitterMobileLogoutThread()); 
     65                        } 
    5766                        tlt = new TwitterMobileLoginThread(CommonData.configxml.login.userid, password); 
     67                        se.addThread(tlt); 
    5868                        CommonData.state = 10; 
    59                         tlt.start(); 
    60                         tlt.join(); 
     69                        se.start(); 
     70                        se.join(); 
    6171                        next(onLogin); 
    6272                } 
  • air/TLife/trunk/src/uwi/thread/MainThread.as

    r2622 r2624  
    250250                         
    251251                        // ログアウト 
    252                         if(CommonData.configxml.logoutonexit == "true"){ 
     252                        if(CommonData.configxml.logoutonexit == "true" && (CommonData.state == 1 || CommonData.state == 10)){ 
    253253                                e.preventDefault(); 
    254254                                var tmlt : TwitterMobileLogoutThread = new TwitterMobileLogoutThread(); 
  • air/TLife/trunk/src/uwi/thread/event/DataGridEventThread.as

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

    r2621 r2624  
    148148                        // TODO 複数reply時のin_reply_to_status_idのとりかた 
    149149                        var tpt : TwitterPostThread = new TwitterPostThread( 
    150                                 "http://twitter.com/statuses/update.json", 
     150                                "http://twitter.com/statuses/update.xml", 
    151151                                "status=" + decodeURI(postarea.text + footer) +  
    152152                                (CommonData.in_reply_to_status_id != "" ? "&in_reply_to_status_id=" + CommonData.in_reply_to_status_id : "") + 
    153153                                "&source=TLife" 
    154                                 , "GET"); 
     154                                , "POST"); 
    155155                        tpt.start(); 
    156                         tpt.join(CommonData.configxml.timeout); 
     156                        tpt.join(); 
    157157                        error(Error, onError); 
    158                         timeout(onTimeout); 
    159                         next(onPostCompleted); 
     158                        next(onPostComplete); 
    160159                }  
    161160                 
    162                 private function onPostCompleted() : void 
     161                private function onPostComplete() : void 
    163162                { 
    164                         Logger.debug("PostEventThread Successed"); 
     163                        Logger.debug("PostEventThread Succeeded"); 
    165164                         
    166165                        CommonData.in_reply_to_status_id = ""; 
     
    180179                        next(waitEvents); 
    181180                } 
    182                  
    183                 private function onTimeout() : void 
    184                 { 
    185                         Logger.warn("PostEventThread Timeout"); 
    186                         postbtn.enabled = true; 
    187                         next(waitEvents); 
    188                 } 
    189181        } 
    190182         
  • air/TLife/trunk/src/uwi/twitter/TwitterLoginThread.as

    r2589 r2624  
    7676                        ult = new URLLoaderThread(req); 
    7777                        ult.start(); 
    78                         trace("timeout : " + int(CommonData.configxml.timeout)); 
    7978                        ult.join(CommonData.configxml.timeout); 
    8079                        event(ult.loader, HTTPStatusEvent.HTTP_RESPONSE_STATUS, onResponse); 
  • air/TLife/trunk/src/uwi/twitter/TwitterPostThread.as

    r2531 r2624  
    5252                                        CommonData.mainstatusbar.write(eventname + "成功!"); 
    5353                                } 
    54                                 onSucceed.apply(); 
     54                                if(onSucceed != null)onSucceed.apply(); 
    5555                        }else{ 
    5656//                              Alert.show(CommonData.TWITTER_RESPONSE[event.status], eventname); 
  • air/TLife/trunk/src/uwi/ui/friends/FriendsEventThread.as

    r2621 r2624  
    2222                private var friends : Friends; 
    2323                private var dbst : DBSelectThread; 
    24                 private var sub : EventThread; 
    2524                private var le : LazyExecutor; 
    2625                 
     
    3332                protected override function run() : void  
    3433                { 
    35                         sub = new EventThread(friends, KeyboardEvent.KEY_DOWN, onKeyDown); 
    36                         sub.start(); 
    3734                        loadInfo(); 
    3835                } 
     
    4037                protected override function finalize() : void 
    4138                { 
    42                         sub = null; 
    4339                        le = null; 
    4440                } 
     
    4743                { 
    4844                        event(friends.searchbox, Event.CHANGE, function(e : Event) : void { le.impulse(); next(waitEvents); } ); 
    49                 } 
    50                  
    51                 private function onKeyDown(e : KeyboardEvent) : void 
    52                 { 
    53                         friends.searchbox.setFocus(); 
    54                         next(sub.waitEvents); 
    5545                } 
    5646                 
  • air/TLife/trunk/src/uwi/util/URLPostThread.as

    r2621 r2624  
    3333                        this.poststr = poststr; 
    3434                        this.timeout_ = timeout_; 
     35                        this.response = response; 
    3536                }  
    3637                 
     
    3940                        var req : URLRequest = new URLRequest(url); 
    4041                        req.method = URLRequestMethod.POST; 
    41                         req.data = encodeURI(poststr)
     42                        req.data = poststr
    4243                         
    4344                        ult = new URLLoaderThread(req);