lib/Ext/platform/src/data/proxies/SyncProxy.js
function(config,callback,scope) {
		//
		Ext.data.utilities.check('SyncProxy', 'constructor', 'config', config, ['store','database_name','key']);
		//
		Ext.data.SyncProxy.superclass.constructor.call(this, config);
		this.store= config.store;
		//
		// System Name
		//
		this.store.readValue('Sencha.Sync.system_name',function(system_name){
			config.system_name= system_name || Ext.data.UUIDGenerator.generate();
			this.store.writeValue('Sencha.Sync.system_name',config.system_name,function(){
				//
				// Load Configuration
				//
				Ext.data.utilities.apply(this,[
					'readConfig_DatabaseDefinition',
					'readConfig_CSV',
					'readConfig_Generator'],[config],function(){
					if (this.definition.system_name===undefined) {
						this.definition.set({system_name:Ext.data.UUIDGenerator.generate()});
					}
					console.log("SyncProxy - Opened database '"+config.key+"/"+config.database_name+"/"+config.datastore_name+"'")
					if (callback) { callback.call(scope,this) }
				},this);
			},this);
		},this);
  }
function(config,callback,scope) {
		//
		Ext.data.utilities.check('SyncProxy', 'constructor', 'config', config, ['store','database_name','key']);
		//
		Ext.data.SyncProxy.superclass.constructor.call(this, config);
		this.store= config.store;
		//
		// System Name
		//
		this.store.readValue('Sencha.Sync.system_name',function(system_name){
			config.system_name= system_name || Ext.data.UUIDGenerator.generate();
			this.store.writeValue('Sencha.Sync.system_name',config.system_name,function(){
				//
				// Load Configuration
				//
				Ext.data.utilities.apply(this,[
					'readConfig_DatabaseDefinition',
					'readConfig_CSV',
					'readConfig_Generator'],[config],function(){
					if (this.definition.system_name===undefined) {
						this.definition.set({system_name:Ext.data.UUIDGenerator.generate()});
					}
					console.log("SyncProxy - Opened database '"+config.key+"/"+config.database_name+"/"+config.datastore_name+"'")
					if (callback) { callback.call(scope,this) }
				},this);
			},this);
		},this);
  }
function ( config , callback , scope ) { // Ext . data . utilities . check ( 'SyncProxy' , 'constructor' , 'config' , config , [ 'store' , 'database_name' , 'key' ] ) ; // Ext . data . SyncProxy . superclass . constructor . call ( this , config ) ; this . store = config . store ; // // System Name // this . store . readValue ( 'Sencha.Sync.system_name' , function ( system_name ) { config . system_name = system_name || Ext . data . UUIDGenerator . generate ( ) ; this . store . writeValue ( 'Sencha.Sync.system_name' , config . system_name , function ( ) { // // Load Configuration // Ext . data . utilities . apply ( this , [ 'readConfig_DatabaseDefinition' , 'readConfig_CSV' , 'readConfig_Generator' ] , [ config ] , function ( ) { if ( this . definition . system_name === undefined ) { this . definition . set ( { system_name : Ext . data . UUIDGenerator . generate ( ) } ) ; } console . log ( "SyncProxy - Opened database '" + config . key + "/" + config . database_name + "/" + config . datastore_name + "'" ) if ( callback ) { callback . call ( scope , this ) } } , this ) ; } , this ) ; } , this ) ; }
JCM constructor should not be async, delay until first operation
JCM constructor should not be async delay until first operation