チェンジセット 1875

差分発生行の前後
無視リスト:
コミット日時:
2008/11/20 03:43:42 (2 ヶ月前)
コミッタ:
uwi
ログメッセージ:

--

ファイル:

凡例:

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

    r1873 r1875  
    1313                <title>TLife</title>  
    1414                <content>TLife.swf</content>  
    15                 <systemChrome>standard</systemChrome>  
    16                 <transparent>false</transparent>  
     15<!--            <systemChrome>standard</systemChrome> --> 
     16<!--            <transparent>false</transparent> --> 
     17        <systemChrome>none</systemChrome> 
     18        <transparent>true</transparent> 
    1719                <visible>true</visible>  
    1820                <minimizable>true</minimizable>  
    19                 <maximizable>true</maximizable>  
     21                <maximizable>false</maximizable>  
    2022                <resizable>true</resizable>  
    2123        </initialWindow>  
  • air/TLife/src/Main.mxml

    r1874 r1875  
    11<?xml version="1.0"?> 
    2 <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="onLoad()"> 
     2<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" 
     3        width="600" height="300" 
     4        layout="absolute"  
     5        applicationComplete="onLoad()"> 
    36        <mx:Script> 
    47                <![CDATA[ 
    58                        import flash.display.Sprite; 
    69                        import mx.collections.ArrayCollection; 
     10                        import mx.controls.Alert; 
     11                        import mx.events.FlexNativeMenuEvent; 
     12                        import mx.events.MenuEvent; 
    713                        import org.libspark.thread.EnterFrameThreadExecutor; 
    814                        import org.libspark.thread.Thread; 
     
    1218 
    1319                        [Bindable] 
    14                         private var timeline : ArrayCollection = new ArrayCollection(); 
     20                        private var tlrecent : ArrayCollection = new ArrayCollection(); 
     21                         
     22                        [Bindable] 
     23                        private var tlreply : ArrayCollection = new ArrayCollection(); 
    1524                 
    1625                        private var c : Components = new Components(); 
    1726                         
    18                         public function onLoad():void { 
     27                        public function onLoad() : void 
     28                        { 
     29//                              stage.nativeWindow.width = 600; 
     30//                              stage.nativeWindow.height = 300; 
    1931                                 
    2032                                if(!Thread.isReady){ 
     
    2436                                Thread.uncaughtErrorHandler = function(e : Error, t : Thread) : void { trace(e.message); }; 
    2537                                 
    26                                 c.foranalyzing = foranalyzing; 
    2738                                c.forprinting = forprinting; 
    28                                 c.timeline = timeline; 
     39                                c.tlrecent = tlrecent; 
     40                                c.tlreply = tlreply; 
    2941                                 
    3042                                new MainThread(this.stage, c).start(); 
     43                        } 
     44                         
     45                        private function onMenuItemClick(event : MenuEvent) : void 
     46                        { 
     47                                Alert.show(event.label); 
    3148                        } 
    3249                ]]> 
    3350        </mx:Script> 
    3451         
    35     <mx:DataGrid dataProvider="{timeline}" right="0" bottom="200" top="0" left="0"> 
    36         <mx:columns> 
    37                         <!-- 
    38             <mx:DataGridColumn headerText="画像" dataField="image" width="40"> 
    39                 <mx:itemRenderer> 
    40                     <mx:Component><mx:Image width="32" height="32"/></mx:Component> 
    41                 </mx:itemRenderer> 
    42             </mx:DataGridColumn> 
    43                         --> 
    44             <mx:DataGridColumn headerText="username" dataField="voice" width="120"/> 
    45             <mx:DataGridColumn headerText="userid" dataField="voiceid" width="80"/> 
    46             <mx:DataGridColumn headerText="content" dataField="content" width="300" wordWrap="true"/> 
    47             <mx:DataGridColumn headerText="postedtime" dataField="postedtime" width="200" /> 
    48         </mx:columns> 
    49     </mx:DataGrid> 
     52    <mx:MenuBar dataProvider="{myMenuData}"   
     53            labelField="@label"  
     54            showRoot="false"  
     55                        itemClick="onMenuItemClick(event);"> 
     56    </mx:MenuBar>  
     57    <mx:XML id="myMenuData">  
     58        <xmlRoot>  
     59            <menuitem label="更新"> 
     60                                <menuitem label="更新" /> 
     61                        </menuitem> 
     62            <menuitem label="設定" /> 
     63            <menuitem label="へるぷ" /> 
     64        </xmlRoot> 
     65    </mx:XML>  
    5066         
    51         <mx:Button label="reload" click="new TwitterReloadThread(c).start();" /> 
    52         <mx:DateFormatter id="foranalyzing" formatString="YYYY-MM-DDTJ:NN:SS" /> 
     67        <mx:TextArea x="0" y="20" width="100%" height="20" id="postarea" /> 
     68         
     69        <mx:TabNavigator x="0" y="40" width="100%" height="60%"  
     70                focusAlpha="0.6" 
     71                horizontalAlign="left" 
     72        > 
     73                <mx:VBox label="recent"> 
     74                        <mx:DataGrid x="0" y="20" dataProvider="{tlrecent}"> 
     75                                <mx:columns> 
     76                                        <!-- 
     77                                        <mx:DataGridColumn headerText="画像" dataField="image" width="40"> 
     78                                                <mx:itemRenderer> 
     79                                                        <mx:Component><mx:Image width="32" height="32"/></mx:Component> 
     80                                                </mx:itemRenderer> 
     81                                        </mx:DataGridColumn> 
     82                                        --> 
     83                                        <mx:DataGridColumn headerText="username" dataField="voice" width="100"/> 
     84                                        <mx:DataGridColumn headerText="userid" dataField="voiceid" width="60"/> 
     85                                        <mx:DataGridColumn headerText="content" dataField="content" wordWrap="true"/> 
     86                                        <mx:DataGridColumn headerText="postedtime" dataField="postedtime" width="100" /> 
     87                                </mx:columns> 
     88                        </mx:DataGrid> 
     89                </mx:VBox> 
     90                 
     91                <mx:VBox label="reply"> 
     92                        <mx:DataGrid x="0" y="20" dataProvider="{tlreply}"> 
     93                                <mx:columns> 
     94                                        <!-- 
     95                                        <mx:DataGridColumn headerText="画像" dataField="image" width="40"> 
     96                                                <mx:itemRenderer> 
     97                                                        <mx:Component><mx:Image width="32" height="32"/></mx:Component> 
     98                                                </mx:itemRenderer> 
     99                                        </mx:DataGridColumn> 
     100                                        --> 
     101                                        <mx:DataGridColumn headerText="username" dataField="voice" width="100"/> 
     102                                        <mx:DataGridColumn headerText="userid" dataField="voiceid" width="60"/> 
     103                                        <mx:DataGridColumn headerText="content" dataField="content" wordWrap="true"/> 
     104                                        <mx:DataGridColumn headerText="postedtime" dataField="postedtime" width="100" /> 
     105                                </mx:columns> 
     106                        </mx:DataGrid> 
     107                </mx:VBox> 
     108        </mx:TabNavigator>               
     109         
     110<!--    <mx:Button x="150" y="200" label="reload" click="new TwitterReloadThread(c).start();" /> --> 
     111<!--    <mx:Button x="214" y="200" label="閉じる" click="onCloseButtonClick(event)"/> --> 
     112 
    53113        <mx:DateFormatter id="forprinting" formatString="YY/MM/DD J:NN:SS" /> 
    54114         
  • air/TLife/src/uwi/bean/StatusGetter.as

    r1874 r1875  
    1313                        var ret : Vector.<Status> = new Vector.<Status>(); 
    1414                         
    15                         trace("src : " + src); 
    16                          
    1715                        var pinched : Vector.<String> = StringUtility.pinchAll(src, "<tr id=\"status_", "</tr>"); 
    18                       trace("pinched : " + pinched.length); 
     16//                    trace("pinched : " + pinched.length); 
    1917                        for each(var str : String in pinched) { 
    2018                                ret.push(extract(str)); 
  • air/TLife/src/uwi/thread/MainThread.as

    r1874 r1875  
    33        import flash.net.URLRequestDefaults; 
    44        import flash.text.TextField; 
     5        import flash.utils.getTimer; 
    56        import mx.collections.ArrayCollection; 
     7        import mx.core.Application; 
    68        import org.libspark.thread.Thread; 
    79        import org.libspark.thread.utils.SerialExecutor; 
     
    2527                protected override function run() : void 
    2628                { 
    27 //                      http://tinyurl.com/8wz 
    2829                        //tuet = new TinyURLEncodeThread("http://www.google.co.jp"); 
    2930                        //tuet.start(); 
  • air/TLife/src/uwi/thread/TwitterLoginThread.as

    r1874 r1875  
    44        import flash.net.URLRequestMethod; 
    55        import mx.controls.Alert; 
     6        import mx.core.Application; 
    67        import org.libspark.thread.Thread; 
    78        import org.libspark.thread.threads.net.URLLoaderThread; 
     
    2223                protected override function run() : void 
    2324                { 
     25                        Application.application.statusBar.status = "Login.."; 
    2426                        var poststr : String = "session[username_or_email]=" + username + "&session[password]=" + password; 
    2527                         
     
    3840                private function onError(e : Error, t : Thread) : void 
    3941                { 
    40                         trace(e.getStackTrace()); 
     42                        Alert.show(e.getStackTrace(), "Login"); 
    4143                } 
    4244                 
     
    4547                        if (event.status == 401) { 
    4648                                Alert.show("Login Failed!", "Login"); 
    47                                 trace("login failed!"); 
    4849                        } 
     50                        Application.application.statusBar.status = "Login succeeded."; 
    4951                } 
    5052        } 
  • air/TLife/src/uwi/thread/TwitterReloadThread.as

    r1874 r1875  
    22        import flash.net.URLRequest; 
    33        import mx.collections.ArrayCollection; 
     4        import mx.core.Application; 
    45        import org.libspark.thread.Thread; 
    56        import org.libspark.thread.threads.net.URLLoaderThread; 
     
    2223                protected override function run() : void 
    2324                { 
     25                        Application.application.statusBar.status = "Reloading.."; 
    2426                        ult = new URLLoaderThread(new URLRequest("http://twitter.com/home")); 
    2527                        ult.start(); 
     
    3032                private function loadCompleted() : void 
    3133                { 
     34                        Application.application.statusBar.status = "Reloaded."; 
    3235                        var statuses : Vector.<Status> = StatusGetter.get(ult.loader.data); 
    3336                        for each(var s : Status in statuses) { 
    34                                 components.timeline.addItem( { 
     37                                components.tlrecent.addItem( { 
    3538                                        voice : s.Voice, 
    3639                                        voiceid : s.VoiceID, 
  • air/TLife/src/uwi/util/Components.as

    r1874 r1875  
    11package uwi.util { 
     2        import flash.utils.Dictionary; 
    23        import mx.collections.ArrayCollection; 
    34        import mx.formatters.DateFormatter; 
     
    89         */ 
    910        public class Components { 
    10                 public var foranalyzing : DateFormatter; 
    1111                public var forprinting : DateFormatter; 
    1212                 
    13                 public var timeline : ArrayCollection; 
     13                public var tlrecent : ArrayCollection; 
     14                public var tlreply : ArrayCollection; 
     15                 
     16                public var statusdic : Dictionary; 
    1417        } 
    1518