PDA

View Full Version : Is Architect so Fickle? Adding and removing a controller stops simple app working



aysencha
22 Sep 2013, 3:57 AM
I'm a newbie just trying to learn the Touch framework and Architect at the same time.

I created a very simple app in Architect as follows:

1) Dropped a Navigation View into the project
2) Dropped an action sheet with 2 simple buttons into the project, class level
3) Dragged the action sheet onto the Nav view to create a link

At this point it renders perfectly when previewed.

4) clicked the + sign at top right to add a controller but before configuring I decided to run the project

The the project stopped displaying anything when previewed. Even after deleting the empty controller, it still does not work. I can't understand this behavior especially as the only change to the project (i.e. adding a controller) has been reversed. Can anyone help me with the cause of this and how to fix?

Below is the residual code in Architect (after removing the controller and I see nothing wrong):


//@require @packageOverrides
Ext.Loader.setConfig({


});


Ext.application({
views: [
'MyNavigationView',
'MyActionSheet'
],
controllers: [
'MyController'
],
name: 'MyApp',


launch: function() {


Ext.create('MyApp.view.MyNavigationView', {fullscreen: true});
}


});





Ext.define('MyApp.view.MyNavigationView', {
extend: 'Ext.navigation.View',


requires: [
'MyApp.view.MyActionSheet'
],


config: {
ui: 'light',
items: [
{
xtype: 'myactionsheet'
}
]
}


});


Ext.define('MyApp.view.MyActionSheet', {
extend: 'Ext.ActionSheet',
alias: 'widget.myactionsheet',


config: {
items: [
{
xtype: 'btnsell',
text: 'Sell'
},
{
xtype: 'button',
text: 'Log Out'
}
]
}


});

aysencha
22 Sep 2013, 12:22 PM
Problem solved: I discovered I had changed my main nav's userclassname.

However, why the code kept on working until I added and removed a controller remains a mystery.