-
31 Mar 2010 7:12 AM #1
Code for Stores
Code for Stores
Can the code generator create the code for the stores I create?
Currently it seems to just reference them by name, like:
store: 'MyStore'
But does not, in any way, define MyStore in the outputted class/json code.
Will this be added? And, will the custom components api (coming soon I assume) also support custom stores?
Thanks,
Luke
-
31 Mar 2010 7:25 AM #2
Luke -
Take a look at the store files which are generated.
These files are generated once you can remove them to re-create them if you need any changes made to them.Code:/* * File: CompanyStore.js * Date: Wed Mar 31 2010 08:22:10 GMT-0700 (PDT) * * This file was generated by Ext Designer version 1.0.0. * http://www.extjs.com/products/designer/ * * This file will be generated the first time you export. * * You should implement event handling and custom methods in this * class. */ CompanyStore = Ext.extend(Ext.data.ArrayStore, { constructor: function() { CompanyStore.superclass.constructor.call(this, { storeId: 'CompanyStore', fields : [ { xtype: 'datafield', name: 'company', type: 'auto' }, { xtype: 'datafield', name: 'price', type: 'float' }, { xtype: 'datafield', name: 'change', type: 'float' }, { xtype: 'datafield', name: 'pctChange', type: 'float' }, { xtype: 'datafield', name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia' } ] }); } }); new CompanyStore();
Yes.And, will the custom components api (coming soon I assume) also support custom stores?Aaron Conran
@aconran
Sencha Architect Development Team
-
31 Mar 2010 11:48 AM #3
Shouldn't they be recreated during each export, regardless of whether or not the file already exists?
I have not managed to get a project to export yet (the button is greyed out). What conditions is it waiting for before allowing me to export?
Thanks,
Luke
-
31 Mar 2010 11:58 AM #4
Yes, I believe we are going to change this behavior.
You need to have a project to export the project. Save the project and the export button will be enabled. By default, generated code will saved in the same directory as where the .xds file resides. You can change this by going to Edit -> Preferences and providing a relative directory to where the .xds file is.Aaron Conran
@aconran
Sencha Architect Development Team


Reply With Quote