Results 1 to 4 of 4

Thread: Object [object Object] has no method 'getViewport'

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    12
    Vote Rating
    -1
      0  

    Default Object [object Object] has no method 'getViewport'

    Hi,

    I have developed an application with sencha touch pr3 and now migrating to the sencha-touch-2.0.1.1-gpl version. And I had to make some of the changes in my application as per new structure.

    I read somewhere refs is no more an array and should be mentioned something like this, but still the issue hasn't gone away.

    Code:
    Ext.application({
        name               : 'TestApp',
        autoCreateViewport : true,          
        controllers : [
            'App'                           
        ],
              config: { 
    	          refs : 
    	          {
    	              viewport : {                          
    	              	selector : 'test-viewport',
    	              },
                },
                handleClick: function() {
                  var viewport   = refs.getViewport(),
                       getViewport();
                  }
    }
    can some one tell me what is wrong with this code ? Its been four months I am out of this project and now migrating is looking little painful.

    thx
    Srinivas

  2. #2
    Sencha User
    Join Date
    Aug 2010
    Posts
    12
    Vote Rating
    -1
      -1  

    Default any helpiing hands ?

    looking for helping hand to launch my application soon. appreciate any help.

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

    Default

    autoCreateViewport is not a valid config of Ext.application. Sencha Touch 2 creates a global "viewport" that by default is a Container with card layout that you can add items to and use. You can get this viewport via Ext.Viewport.
    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

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    14
    Vote Rating
    0
      0  

    Default ViewPort to show a form after click

    can I use a viewport to show a form after a disclosure in a list , what is the best practice ? for sencha touch 2.0

Posting Permissions

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