チェンジセット 3176
- コミット日時:
- 2009/10/23 22:39:06 (2 年前)
- ファイル:
-
- as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/events/GeniusEvent.as (更新) (2 diffs)
- as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/models/Model.as (更新) (4 diffs)
- as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/threads/GeniusThread.as (更新) (4 diffs)
- as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/threads/URLLoaderServiceThread.as (更新) (2 diffs)
- as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/views/ItemRendererDelegate.as (更新) (1 diff)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/events/GeniusEvent.as
r3100 r3176 7 7 public static const ASSETES_LOADED:String = 'assetsLoaded'; 8 8 public static const UPDATE_PAGE:String = 'updatePage'; 9 public static const NOTIFIED:String = 'notified'; 9 10 10 11 public function GeniusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) … … 13 14 } 14 15 16 public var data:Object; 17 15 18 } 16 19 } as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/models/Model.as
r3163 r3176 26 26 package jp.seagirl.genius.models 27 27 { 28 import flash.events.EventDispatcher; 28 29 import flash.utils.getQualifiedClassName; 29 30 31 import jp.seagirl.genius.events.GeniusEvent; 30 32 import jp.seagirl.genius.managers.CursorManager; 31 33 32 34 import mx.utils.ObjectUtil; 35 36 [Event(name="notified", type="jp.seagirl.genius.events.GeniusEvent")] 33 37 34 38 /** … … 37 41 * @author yoshizu 38 42 */ 39 public class Model implements IModel43 public class Model extends EventDispatcher implements IModel 40 44 { 41 45 //-------------------------------------------------------------------------- … … 161 165 //---------------------------------- 162 166 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 } 168 188 169 189 //---------------------------------- … … 395 415 _filterCondition = ObjectUtil.copy(defaultFilterCondition); 396 416 } 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 } 398 427 } 399 428 } as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/threads/GeniusThread.as
r3100 r3176 32 32 import jp.seagirl.genius.views.ApplicationDelegate; 33 33 34 import mx.controls.Alert; 35 import mx.utils.ObjectUtil; 36 34 37 import org.libspark.thread.Thread; 35 38 … … 43 46 super(); 44 47 45 initialize();48 context = ApplicationDelegate.sharedApplicationDelegate().context; 46 49 } 47 50 … … 68 71 //-------------------------------------------------------------------------- 69 72 70 /**71 * 初期化メソッドです.72 */73 private function initialize():void74 {75 context = ApplicationDelegate.sharedApplicationDelegate().context;76 }77 78 73 protected function getConfig():Config 79 74 { … … 89 84 { 90 85 return context.getController(controllerName); 86 } 87 88 protected function alert(text:*, title:String = 'エラー'):void 89 { 90 Alert.show(ObjectUtil.toString(text), title); 91 91 } 92 92 as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/threads/URLLoaderServiceThread.as
r924 r3176 26 26 package jp.seagirl.genius.threads 27 27 { 28 import flash.errors.IOError; 28 29 import flash.net.URLRequest; 29 30 import flash.net.URLVariables; 30 31 32 import mx.controls.Alert; 33 import mx.utils.ObjectUtil; 34 35 import org.libspark.thread.Thread; 31 36 import org.libspark.thread.threads.net.URLLoaderThread; 32 37 … … 90 95 } 91 96 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 92 115 } 93 116 } as3/GeniusFramework/branches/2.0/src/jp/seagirl/genius/views/ItemRendererDelegate.as
r3100 r3176 53 53 super.view_initializeHandler(event); 54 54 55 if (this['view'].data) 56 update(); 57 55 58 this['view'].addEventListener(FlexEvent.DATA_CHANGE, view_dataChangeHandler); 56 59 }

