Revision: 28927
Updated Code
at July 17, 2010 07:14 by zwigby
Updated Code
package { [Bindable] public class MainModel { private static var _instance:MainModel = new MainModel(ModelEnforcer); public static function getInstance():MainModel { return _instance; } public function MainModel(enforcer:Class) { if(enforcer != ModelEnforcer) { throw new Error("Use MainModel.getInstance to access model"); } } } } class ModelEnforcer {}
Revision: 28926
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 16, 2010 06:28 by zwigby
Initial Code
package { import mx.collections.ArrayCollection; [Bindable] public class MainModel { private static var _instance:MainModel = new MainModel(ModelEnforcer); public static function getInstance():MainModel { return _instance; } public function MainModel(enforcer:Class) { if(enforcer != ModelEnforcer) { throw new Error("Use MainModel.getInstance to access model"); } } } } class ModelEnforcer {}
Initial URL
Initial Description
Initial Title
Flex Model Singleton
Initial Tags
Initial Language
ActionScript