チェンジセット 3176

差分発生行の前後
無視リスト:
コミット日時:
2009/10/23 22:39:06 (2 年前)
コミッタ:
seagirl
ログメッセージ:

update

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/events/GeniusEvent.as

    r3100 r3176  
    77                public static const ASSETES_LOADED:String = 'assetsLoaded'; 
    88                public static const UPDATE_PAGE:String = 'updatePage'; 
     9                public static const NOTIFIED:String = 'notified'; 
    910                 
    1011                public function GeniusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) 
     
    1314                } 
    1415                 
     16                public var data:Object; 
     17                 
    1518        } 
    1619} 
  • as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/models/Model.as

    r3163 r3176  
    2626package jp.seagirl.genius.models 
    2727{ 
     28        import flash.events.EventDispatcher; 
    2829        import flash.utils.getQualifiedClassName; 
    2930         
     31        import jp.seagirl.genius.events.GeniusEvent; 
    3032        import jp.seagirl.genius.managers.CursorManager; 
    3133         
    3234        import mx.utils.ObjectUtil; 
     35         
     36        [Event(name="notified", type="jp.seagirl.genius.events.GeniusEvent")] 
    3337         
    3438        /** 
     
    3741         * @author yoshizu  
    3842         */      
    39         public class Model implements IModel 
     43        public class Model extends EventDispatcher implements IModel 
    4044        { 
    4145                //-------------------------------------------------------------------------- 
     
    161165                //---------------------------------- 
    162166                 
    163                 [Bindable] 
    164                 /** 
    165                  * サービスとの通信結果です。 
    166                  */              
    167                 public var lastResult:XML; 
     167                /** 
     168                 * @private  
     169                 */ 
     170                private var _lastResult:XML; 
     171                 
     172                [Bindable] 
     173                /** 
     174                 *  サービスとの通信結果です。 
     175                 */ 
     176                public function get lastResult():XML 
     177                { 
     178                        return _lastResult; 
     179                } 
     180                 
     181                /** 
     182                 * @private  
     183                 */      
     184                public function set lastResult(value:XML):void 
     185                { 
     186                        _lastResult = value; 
     187                } 
    168188                 
    169189                //---------------------------------- 
     
    395415                        _filterCondition = ObjectUtil.copy(defaultFilterCondition); 
    396416                } 
    397  
     417                 
     418                /** 
     419                 * メッセージを送出します。 
     420                 */              
     421                public function notify(message:String):void 
     422                { 
     423                        var event:GeniusEvent = new GeniusEvent(GeniusEvent.NOTIFIED); 
     424                        event.data = message; 
     425                        dispatchEvent(event); 
     426                } 
    398427        } 
    399428} 
  • as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/threads/GeniusThread.as

    r3100 r3176  
    3232        import jp.seagirl.genius.views.ApplicationDelegate; 
    3333         
     34        import mx.controls.Alert; 
     35        import mx.utils.ObjectUtil; 
     36         
    3437        import org.libspark.thread.Thread; 
    3538 
     
    4346                        super(); 
    4447                         
    45                         initialize()
     48                        context = ApplicationDelegate.sharedApplicationDelegate().context
    4649                } 
    4750                 
     
    6871                //-------------------------------------------------------------------------- 
    6972                 
    70                 /** 
    71                  * 初期化メソッドです.  
    72                  */              
    73                 private function initialize():void 
    74                 { 
    75                         context = ApplicationDelegate.sharedApplicationDelegate().context; 
    76                 } 
    77                  
    7873                protected function getConfig():Config 
    7974                { 
     
    8984                { 
    9085                        return context.getController(controllerName); 
     86                } 
     87                 
     88                protected function alert(text:*, title:String = 'エラー'):void 
     89                { 
     90                        Alert.show(ObjectUtil.toString(text), title); 
    9191                } 
    9292                 
  • as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/threads/URLLoaderServiceThread.as

    r924 r3176  
    2626package jp.seagirl.genius.threads 
    2727{ 
     28        import flash.errors.IOError; 
    2829        import flash.net.URLRequest; 
    2930        import flash.net.URLVariables; 
    3031         
     32        import mx.controls.Alert; 
     33        import mx.utils.ObjectUtil; 
     34         
     35        import org.libspark.thread.Thread; 
    3136        import org.libspark.thread.threads.net.URLLoaderThread; 
    3237 
     
    9095                } 
    9196                 
     97                override protected function run():void 
     98                { 
     99                        error(IOError, handleError); 
     100                        error(SecurityError, handleError); 
     101                         
     102                        initialize(); 
     103                } 
     104                 
     105                protected function initialize():void 
     106                { 
     107                         
     108                } 
     109                 
     110                protected function handleError(error:Error, thread:Thread):void 
     111                { 
     112                        alert(error.message) 
     113                } 
     114                 
    92115        } 
    93116} 
  • as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/views/ItemRendererDelegate.as

    r3100 r3176  
    5353                        super.view_initializeHandler(event); 
    5454                         
     55                        if (this['view'].data) 
     56                                update(); 
     57                         
    5558                        this['view'].addEventListener(FlexEvent.DATA_CHANGE, view_dataChangeHandler); 
    5659                }