チェンジセット 1876

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

--

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • air/TLife/src/Main.mxml

    r1875 r1876  
    11<?xml version="1.0"?> 
    22<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" 
    3         width="600" height="300" 
     3        width="300" height="350" 
    44        layout="absolute"  
     5        title="TLife" 
    56        applicationComplete="onLoad()"> 
    67        <mx:Script> 
    78                <![CDATA[ 
    89                        import flash.display.Sprite; 
     10                        import flash.events.MouseEvent; 
    911                        import mx.collections.ArrayCollection; 
    1012                        import mx.controls.Alert; 
     13                        import mx.events.DataGridEvent; 
    1114                        import mx.events.FlexNativeMenuEvent; 
     15                        import mx.events.ListEvent; 
    1216                        import mx.events.MenuEvent; 
    1317                        import org.libspark.thread.EnterFrameThreadExecutor; 
    1418                        import org.libspark.thread.Thread; 
    1519                        import uwi.thread.MainThread; 
     20                        import uwi.thread.TwitterPostThread; 
    1621                        import uwi.thread.TwitterReloadThread; 
    1722                        import uwi.util.Components; 
     
    2732                        public function onLoad() : void 
    2833                        { 
    29 //                              stage.nativeWindow.width = 600; 
    30 //                              stage.nativeWindow.height = 300; 
    31                                  
    3234                                if(!Thread.isReady){ 
    3335                                        Thread.initialize(new EnterFrameThreadExecutor()); 
     
    4345                        } 
    4446                         
    45                         private function onMenuItemClick(event : MenuEvent) : void 
     47                        private function onPostClick() : void 
    4648                        { 
    47                                 Alert.show(event.label); 
     49                                new TwitterPostThread(postarea.text).start(); 
     50                                postarea.text = ""; 
     51                        } 
     52                         
     53                        private function onItemClick(event : ListEvent) : void 
     54                        { 
     55                                var index : int = event.rowIndex; 
     56                                var obj : Object = tlrecent.source[index]; 
     57                                friendname.text = obj.voice; 
     58                                friendposttime.text = obj.postedtime; 
     59                                friendpost.text = obj.content; 
    4860                        } 
    4961                ]]> 
    5062        </mx:Script> 
    51          
     63 
     64        <!-- 
    5265    <mx:MenuBar dataProvider="{myMenuData}"   
    5366            labelField="@label"  
     
    6477        </xmlRoot> 
    6578    </mx:XML>  
     79        --> 
    6680         
    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> 
     81        <mx:VBox x="0" y="0" width="100%" height="100%"> 
     82                <mx:HBox x="0" y="0" width="100%" verticalScrollPolicy="off"> 
     83                        <mx:TextArea width="80%" height="20" id="postarea" /> 
     84                        <mx:Button width="20%" height="20" label="post" click="onPostClick();" /> 
     85                </mx:HBox> 
    9086                 
    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          
     87                <mx:VDividedBox width="100%"> 
     88                        <mx:VBox width="100%" verticalScrollPolicy="off"> 
     89                                <mx:HBox width="100%" height="20" > 
     90                                        <mx:Label width="50%" text="にゃー" id="friendname" textAlign="left" /> 
     91                                        <mx:Label width="50%" text="( ゚д゚)" id="friendposttime" textAlign="right" /> 
     92                                </mx:HBox> 
     93                                <mx:TextArea width="100%" height="50%" id="friendpost" editable="false" /> 
     94                        </mx:VBox> 
     95                        <mx:VBox width="100%" verticalScrollPolicy="off"> 
     96                                <mx:TabBar x="0" y="100" width="100%" height="20"  
     97                                        horizontalAlign="left" 
     98                                        dataProvider="{tablist}" 
     99                                        /> 
     100 
     101                                <mx:DataGrid x="0" y="120" width="100%" dataProvider="{tlrecent}" 
     102                                        fontFamily="MS Pゴシック" 
     103                                        fontSize="12" 
     104                                        paddingBottom="-4" 
     105                                        paddingTop="-4" 
     106                                        paddingLeft="0" 
     107                                        sortableColumns="false" 
     108                                        itemClick="onItemClick(event);" 
     109                                > 
     110                                        <mx:columns> 
     111                                                <!-- 
     112                                                <mx:DataGridColumn headerText="画像" dataField="image" width="40"> 
     113                                                        <mx:itemRenderer> 
     114                                                                <mx:Component><mx:Image width="32" height="32"/></mx:Component> 
     115                                                        </mx:itemRenderer> 
     116                                                </mx:DataGridColumn> 
     117                                                --> 
     118                                                <mx:DataGridColumn headerText="username" dataField="voice" width="70"/> 
     119                                                <mx:DataGridColumn headerText="userid" dataField="voiceid" width="40"/> 
     120                                                <mx:DataGridColumn headerText="content" dataField="content" width="100" wordWrap="true" /> 
     121                                                <mx:DataGridColumn headerText="postedtime" dataField="postedtime" width="70" /> 
     122                                        </mx:columns> 
     123                                </mx:DataGrid> 
     124                        </mx:VBox> 
     125                </mx:VDividedBox> 
     126        </mx:VBox> 
    110127<!--    <mx:Button x="150" y="200" label="reload" click="new TwitterReloadThread(c).start();" /> --> 
    111128<!--    <mx:Button x="214" y="200" label="閉じる" click="onCloseButtonClick(event)"/> --> 
    112129 
     130        <mx:Array id="tablist"> 
     131                <mx:Object label="recent" /> 
     132                <mx:Object label="reply" /> 
     133        </mx:Array> 
     134                         
    113135        <mx:DateFormatter id="forprinting" formatString="YY/MM/DD J:NN:SS" /> 
    114136         
  • air/TLife/src/uwi/thread/TwitterPostThread.as

    r1874 r1876  
    44        import flash.net.URLRequestMethod; 
    55        import flash.net.URLVariables; 
     6        import mx.controls.Alert; 
    67        import org.libspark.thread.Thread; 
    78        import org.libspark.thread.threads.net.URLLoaderThread;