I have a navigation view, in which go a search, search summary and detail panels/cards.
I find I can use the 'ref' feature in Architect to set up references to containers which I later 'push()' into this app. But I find if I use 'ref' ( auto-create) I cannot find a way to set the title. The only way I seem able to set the title is not to use 'ref' and instead code it as per the below:
var results = Ext.create('LyricsTo.view.SearchResults', { title: 'Search Results'
});
Am I missing something here, or is this ok? Just want to be sure I'm grasping the right way to do MVC in Sencha Touch 2.
refs aren't an Architect feature, it's a feature of Sencha Touch 2 (and Ext JS 4) MVC. All it is a way to hold a reference to a component. So if you set it to a string it will attempt to look it up using ComponentQuery. Set it to an object it will try to resolve it based on the selector config and if it doesn't find a reference and autoCreate is set to true, it will attempt to create it using the xtype config.