Results 1 to 6 of 6

Thread: [B1] getters for views removed?

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    628
    Vote Rating
    40
      0  

    Default [B1] getters for views removed?

    So we had our views defined in controllers and did getXXXView().create(). I see that views were removed from controllers so I put them in the application. Appears getApplication().getXXXView() doesn't exist either.

    So is the preferred way now to do Ext.create() for all views?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Yes. Ed did some major MVC rewriting for PR4 and has said that they weren't used that much versus the performance hit it took when starting up the app.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    39
    Vote Rating
    2
      0  

    Default

    Which, if I'm understanding right, explains why:

    PHP Code:

            showBlogList
    : function() {
             var 
    viewBL this.getBlogListView();
             
    console.log('wtf');
             
    viewBL.setActiveItem(1); 
    }

    doesn't work with the 'Cannot call method 'setActiveItem' of undefined' error.

    Yet why does:

    PHP Code:

     showBlogList
    : function() {
             var 
    viewBL Ext.Create('alchemistBeer.view.BlogList');
             
    console.log('wtf');
             
    viewBL.setActiveItem(1);
        } 
    throw the "Object #<Object> has no method 'Create'" error?

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    It should be Ext.create not Ext.Create
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Mar 2011
    Posts
    39
    Vote Rating
    2
      0  

    Default

    PHP Code:
    <class="embarassed" style="bright glowing Red"oh.....nevermind </p
    off and running, thx Mitchell!!

  6. #6
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Quote Originally Posted by Rhoover View Post
    PHP Code:
    <class="embarassed" style="bright glowing Red"oh.....nevermind </p
    off and running, thx Mitchell!!
    No worries. I do those little mistakes all the time too
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

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