Hey! I have a problem here...
I have an list and an add button and when the user clicks the add button I would like to show a settings panel. When the user taps on an item, the settings panel sould close and the settings will be updated.

It works for me but when I tap the add button again I get an error... maybe someone sees the problem.

Here is the code:

Code:
 onAddButtonTap: function(button) {
        console.log('button taped');
        var newMyPanel = Ext.create('widget.settings');
        newMyPanel.showBy(button);
}
This creates and shows the settings panel under the add button. I think that the problem is here, I dont want to create the panel every time the button is taped but when I remove the line the panel doesnt show up

When I try to hide the panel:
Code:
    onsSettingsItemTap: function(component, options) {


        console.log('item tap!!');
        Ext.getCmp('settingsView').hide(); 
    }
I get this error:
Code:
  • [COLOR=red !important]Uncaught TypeError: Cannot read property 'element' of undefined sencha-touch-all.js:32[/COLOR]
    • [COLOR=red !important]Ext.define.alignTo ...[/COLOR]
I think the problem is that the component is already created...

How can I show hide the settings panel correctly?
I also could push it to the nav controller but I like the showBy function...

Thanks!