Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: [FIXED-508] 0.99 Fullscreen does not work with Ext.regApplication()

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    693

    Default [FIXED-508] 0.99 Fullscreen does not work with Ext.regApplication()

    HTML Code:
    Ext.regApplication({
    launch: function(){
    ...
    }
    })
    does not call the
    HTML Code:
    Ext.Viewport.init()
    internally.

    So on the iPhone fullscreen does not work with:
    HTML Code:
    Ext.regApplication({
        name: 'App',
    launch: function() {
                    this.viewport = new Ext.Panel({
                            fullscreen: true,
    
                            id    : 'mainPanel',
                            layout: 'card',
                            items : [
                                    {
                                            html: 'Welcome to My App!'
                                    }
                            ]
                    });
            }
    });
    but fullscreen works with Ext.setup() cause this call internally Ext.Viewport.init()
    HTML Code:
    Ext.setup({
      
        onReady: function() {
            new Ext.Panel( {
              fullscreen: true,
              html: 'test'
            });
        }
    });

  2. #2
    Sencha User BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534

    Default

    Thanks for the bug report.

  3. #3
    Touch Premium Member
    Join Date
    Mar 2008
    Posts
    5

    Default

    This appears to still be an issue with 1.0. Is there a patch or workaround available? This is proving to be a show stopper for something we are trying to accomplish.

  4. #4
    Sencha Premium User mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    693

    Default

    You have do to do something like

    PHP Code:
    Ext.regApplication('Contacts', {
        
    defaultTarget"viewport",
        
    defaultUrl   'Contact/index',
        
    name         "Contacts",
        
    useHistory   true,
        
        
    launch: function() {
            
    this.viewport = new Contacts.Viewport({
                
    applicationthis
            
    });
        }
    }); 
    and

    PHP Code:
    Contacts.Viewport Ext.extend(Ext.Panel, {
        
    id        'viewport',
        
    layout    'card',
        
    fullscreentrue
    }); 

  5. #5
    Touch Premium Member
    Join Date
    Mar 2008
    Posts
    5

    Default

    Hmmm... Exactly what I have and the app still does not show up in fullscreen.

  6. #6
    Sencha Premium User mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    693

    Default

    Quote Originally Posted by awfreeman View Post
    Hmmm... Exactly what I have and the app still does not show up in fullscreen.
    yeap sorry, bug still exists you have still have to wrap you app in ext.setup
    PHP Code:
    Ext.setup({
      
        
    onReady: function() {

    Ext.regApplication('Contacts', {
        
    defaultTarget"viewport",
        
    defaultUrl   'Contact/index',
        
    name         "Contacts",
        
    useHistory   true,
        
        
    launch: function() {
            
    this.viewport = new Contacts.Viewport({
                
    applicationthis
            
    });
        }
    }); 
      }
    }); 

  7. #7
    Touch Premium Member
    Join Date
    Mar 2008
    Posts
    5

    Default

    You had given all of the pieces to begin with, but I had not understood what you were getting at when you said to wrap with Ext.setup. I didn't think to use it to wrap the Ext.regApplication block. Thank you! I will give it a shot and confirm your solution.

  8. #8
    Sencha User Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469

    Default

    This has been addressed in 1.0.2
    Sencha Touch Lead Architect

  9. #9
    Sencha Premium Member
    Join Date
    Sep 2008
    Posts
    710

    Default

    Is 1.0.2 the one that is downloaded now? I am still having viewport init problems with 1.0.1. I have added the following to my launch event :

    Code:
            Ext.Viewport.init();
            this.viewport = new myApp.Viewport({
                application: this,
                ......
    
            });
            Ext.Viewport.onOrientationChange();
    But I notice an error on line 22567 of sencha-touch.js when I am calling the Ext.Viewport.init() directly:
    Code:
        init: function(fn) {
            var me = this,
                stretchSize = Math.max(window.innerHeight, window.innerWidth) * 2,
                body = Ext.getBody();
    
            me.updateOrientation();
    
            this.initialHeight = window.innerHeight;
            this.initialOrientation = this.orientation;
    
            body.setHeight(stretchSize);
            this.scrollToTop();
    
            setTimeout(function() {
                me.scrollToTop();
                me.initialHeight = Math.max(me.initialHeight, window.innerHeight);
                
                //fn();   <=== WHAT IS THIS SUPPOSED TO DO?
    
                me.updateBodySize();
            }, 500);
        },
    Also, to make the iPhone address bar disappear, I use the typical code in the html file:
    Code:
        <meta name="viewport" content="height=device-height,width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> 
    
    And then on the body load:
    <body onorientationchange="setTimeout(function(){window.scrollTo(0,1)},100);"; onload="setTimeout(function(){window.scrollTo(0,1)},100);">
    That META tag now throws 4-5 errors about the attributes not being recognized and the page is not rendering correctly on the phone if that meta tag is included, though Chrome allows it and will display the viewport correctly.

    Are all these items related to the fact that the Viewport is not being properly initialized under 1.0.1 Touch MVC? If so, need to know when O can get a hold of 1.0.2...as I need it yesterday

  10. #10
    Sencha Premium User mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    693

    Default

    fn(); <=== WHAT IS THIS SUPPOSED TO DO?
    Ext.Viewport.init can have a function as argument
    Ext.Viewport.init(function(){dosomething();});
    this function is called on your mentioned place (fn()

Page 1 of 2 12 LastLast

Similar Threads

  1. Ext.setup() vs Ext.regApplication()
    By konki_vienna in forum Sencha Touch 1.x: Discussion
    Replies: 6
    Last Post: 14 Feb 2012, 2:22 AM
  2. setting a panel to fullscreen but not fullscreen
    By DaveC426913 in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 8 Sep 2010, 5:20 AM
  3. Replies: 4
    Last Post: 1 Feb 2010, 2:34 AM
  4. Open source CMS recommendation to work with yiu-ext
    By dolittle in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 8 May 2007, 11:57 AM

Posting Permissions

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