1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Munich, Germany
    Posts
    57
    Vote Rating
    1
    kodak is on a distinguished road

      0  

    Default Unanswered: Problem with showing/hiding an settings panel

    Unanswered: Problem with showing/hiding an settings panel


    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!

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,134
    Answers
    129
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

    Default


    Try destroying the the settings panel after hiding it. That way there won't be more than one. That, or you can have just one settings panel created once and just show/hide when necessary.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar