Sha256: ed48a4fc13b94b984786848e91eccbb4670b541dbd963ceab14d075d40a291a7

Contents?: true

Size: 981 Bytes

Versions: 5

Compression:

Stored size: 981 Bytes

Contents

package <%= class_name.downcase.gsub('::','.') %>.model
{
	import mx.collections.ArrayCollection;
	import mx.collections.ICollectionView;
   
	import com.adobe.cairngorm.model.ModelLocator;
	import <%= class_name.downcase.gsub('::','.') %>.vo.*;
   
	[Bindable]
	public class <%= file_name.camelcase %>ModelLocator implements ModelLocator {
		private static var modelLocator : <%= file_name.camelcase %>ModelLocator;
      
    public static function getInstance() : <%= file_name.camelcase %>ModelLocator {
    	if ( modelLocator == null ) {
      	modelLocator = new <%= file_name.camelcase %>ModelLocator();
      }
			return modelLocator;
		}
      
		//Constructor should be private but current AS3.0 does not allow it yet (?)...
		public function <%= file_name.camelcase %>ModelLocator() {	
			if ( modelLocator != null ) {
				throw new Error( "Only one <%= file_name.camelcase %>ModelLocator instance should be instantiated" );	
			}
		}
   
		/* bindables go here */
	}
}

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
smukherjee-openbill-0.1.5 vendor/generators/cairngorm/templates/ModelLocator_template.as
smukherjee-openbill-0.1.6 vendor/generators/cairngorm/templates/ModelLocator_template.as
smukherjee-openbill-0.1.7 vendor/generators/cairngorm/templates/ModelLocator_template.as
openbill-0.1.5 vendor/generators/cairngorm/templates/ModelLocator_template.as
openbill-0.1.6 vendor/generators/cairngorm/templates/ModelLocator_template.as