Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1761 in a recent build.
  1. #11
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    557
    Vote Rating
    25
    estesbubba will become famous soon enough estesbubba will become famous soon enough

      0  

    Default


    Here is a simple test case that proves sencha-touch-debug.js and builds/sencha-touch-all-debug.js are different. I realize that views{} in the controller isn't correct but it shouldn't work with one and not the other.

    Code:
    Ext.application({
        name: 'MyApp',
    
    
        controllers: [
            'MyController'
        ],
    
    
        launch: function() {
    
    
        }
    });
    
    
    Ext.define('MyApp.controller.MyController', {
    
    
        extend: 'Ext.app.Controller',
        views: [
            'MyView'
        ],
    
    
        launch: function() {
            // Works with sencha-touch-debug.js but not builds/sencha-touch-all-debug.js
            Ext.Viewport.setActiveItem(this.getMyViewView().create({
                devices: [{
                    text: 'Device 1',
                    value: 0
                }, {
                    text: 'Device 2',
                    value: 1
                }]
            }));
            // Works with both
    //        Ext.Viewport.setActiveItem(Ext.create('MyApp.view.MyView', {
    //            devices: [{
    //                text: 'Device 1',
    //                value: 0
    //            }, {
    //                text: 'Device 2',
    //                value: 1
    //            }]
    //        }));
        }
    });
    
    
    Ext.define('MyApp.view.MyView', {
        extend: 'Ext.form.Panel',
        xtype: 'myview',
    
    
        config: {
            fullscreen: true,
            floating: true,
            modal: true,
            centered: true,
            hideOnMaskTap: false,
            layout: {
                type: 'vbox'
            },
            height: 400,
            width: 480
        },
    
    
        initialize: function() {
    
    
            this.callParent();
            this.setItems(this.buildItems());
        },
    
    
        buildItems: function() {
            return [{
                xtype: 'titlebar',
                title: 'My App Rocks',
                docked: 'top'
            }, {
                xtype: 'fieldset',
                title: 'Kiosk Mode',
                defaults: {
                    labelWidth: '50%'
                },
                items: [{
                    xtype: 'selectfield',
                    label: 'Kiosk Name',
                    name: 'kioskName',
                    options: this.config.devices
                }, {
                    xtype: 'checkboxfield',
                    label: 'Development Mode',
                    name: 'devMode',
                    checked: true
                }]
            }, {
                xtype: 'button',
                text: 'Start Kiosk',
                ui: 'confirm',
                itemId: 'startButton'
            }];
        }
    });

  2. #12
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    9
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Hmm I reduced this down a bit further into one file but it works fine with both sencha-touch-debug.js and builds/sencha-touch-all-debug.js. Here's what I have:

    Code:
    <!doctype html>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <title>1673</title>
            <link rel="stylesheet" href="http://edair.local/sencha-touch-2-b1/resources/css/sencha-touch.css"/>
            <script src="http://edair.local/sencha-touch-2-b1/builds/sencha-touch-all-debug.js"></script>
    
    
            <script type="text/javascript">
                Ext.define('MyApp.view.MyView', {
                    extend: 'Ext.Panel',
                    
                    config: {
                        html: 'test'
                    }
                });
            
                Ext.application({
                    name: 'MyApp',
    
    
                    launch: function() {
                        Ext.Viewport.setActiveItem(MyApp.view.MyView.create({
                            html: 'yea',
                            fullscreen: true
                        }));
                    }
                });
            </script>
        </head>
        <body></body>
    </html>
    Are you positive that you're using the right builds? I re-downloaded the SDK from the cdn to make sure that I'm on the public distribution
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  3. #13
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    557
    Vote Rating
    25
    estesbubba will become famous soon enough estesbubba will become famous soon enough

      0  

    Default


    Ed - just re-downloaded and same problem. Highlighted is the code that works in one and not the other. Run my complete app using both and one should puke.

    Code:
            Ext.Viewport.setActiveItem(this.getMyViewView().create({
                devices: [{
                    text: 'Device 1',
                    value: 0
                }, {
                    text: 'Device 2',
                    value: 1
                }]
            }));

  4. #14
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    9
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Ok so I've copied and pasted your entire structure into a sandbox app and fired it up. The first thing I see using sencha-touch-debug.js is that you're getting an error when trying to set your view (which has centered: true) as the active item of the Viewport.

    This doesn't work because when you set centered: true the component becomes floating, which means it can't be the active item of the viewport. Commenting out your centered config avoids this error but obviously no longer centers the component. All you'd need to do instead (with your current code) is use .show() instead:

    Code:
    this.getMyViewView().create({
        devices: [{
            text: 'Device 1',
            value: 0
        }, {
            text: 'Device 2',
            value: 1
        }]
    }).show();
    However, you're also using the 'views' config on your Controller, which is deprecated (you can see the warning in the console advising you not to do this). To bring your app into best practice your Controller should simply look like this:

    Code:
    Ext.define('MyApp.controller.MyController', {
        extend: 'Ext.app.Controller',
        
        launch: function() {
           Ext.create('MyApp.view.MyView', {
               devices: [{
                   text: 'Device 1',
                   value: 0
               }, {
                   text: 'Device 2',
                   value: 1
               }]
           }).show();
        }
    });
    When I run this using B1 everything works as expected.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  5. #15
    Sencha User
    Join Date
    Jan 2012
    Posts
    11
    Vote Rating
    0
    CreepGin is on a distinguished road

      0  

    Default


    Ed,

    Just wondering.... Did you ever come across the problem of the same exact code working in one and not the other, namely builds/sencha-touch-all-debug.js and sencha-touch-debug.js?

  6. #16
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    9
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    It did seem that way, but once I fixed the bug in the app it went away...
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer