Results 1 to 5 of 5

Thread: [PR4]->[B1] dom element remove

  1. #1
    Sencha User
    Join Date
    Apr 2008
    Posts
    51
    Answers
    3
    Vote Rating
    0
      0  

    Default Answered: [PR4]->[B1] dom element remove

    Hi,

    In my html file :
    Code:
    <body><div id="loading-mask"></div></body>
    and in my app.js [PR4] :
    Code:
        launch: function() {
            Ext.create('myApp.view.Main');
            var loadmask = Ext.get('loading-mask');
            loadmask.remove();
        }
    in [B1], I use :
    Code:
        launch: function() {
            Ext.create('mtApp.view.Main');
            var loadmask = Ext.get('loading-mask');
            Ext.removeNode(loadmask);
        }
    but it's not working. Some ideas ?

    thx

  2. I noticed that as well, so I use the "destroy" method

    Code:
    loadMask.destroy();
    instead of "remove" and that works fine. For me, "destroy" works out better since I want to actually remove the component from the DOM, not just hide it.

  3. #2
    Sencha User
    Join Date
    Apr 2008
    Posts
    51
    Answers
    3
    Vote Rating
    0
      0  

    Default

    when using :
    Code:
    loadmask.hide();
    it works

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    56
    Answers
    4
    Vote Rating
    1
      0  

    Default

    I noticed that as well, so I use the "destroy" method

    Code:
    loadMask.destroy();
    instead of "remove" and that works fine. For me, "destroy" works out better since I want to actually remove the component from the DOM, not just hide it.

  5. #4
    Sencha User
    Join Date
    Apr 2008
    Posts
    51
    Answers
    3
    Vote Rating
    0
      0  

    Default

    yes I was testing the "destroy" method
    thx

  6. #5
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Answers
    93
    Vote Rating
    7
      0  

    Default

    Yup, remove has been deprecated in beta 1. If you use the compat build you will see the deprecation warnings when you use it. More information about the compat build here:

    http://docs.sencha.com/touch/2-0/#!/guide/building
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •