1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    25
    Vote Rating
    0
    mcaple is on a distinguished road

      0  

    Default Unanswered: Togglefield and Label

    Unanswered: Togglefield and Label


    I have a view that has the following code

    Code:
    Ext.define('MyApp.view.Profile', {
        extend: 'Ext.form.FormPanel',
        xtype: 'profilepage',    
        id: 'profilepage',
        action: 'profilepage',
        requires: ['Ext.form.FieldSet', 'Ext.field.Toggle'],
        
        config: 
        {
            title: 'Settings',
            iconCls: 'settings',
            styleHtmlContent: true,
            
            items: [
                {
                    xtype: 'fieldset',
                    title: 'Settings',
                    instructions: 'This will save setup information to your device',
                    
                    items: [
                        {
                            xtype: 'togglefield',
                            name: 'keepprofile',
                            label: 'Save Profile',
                            config:
                            {
                                maxValue: 1,
                                minValue: 0
                            }
                        }
                    ]
                }
            ]        
        },
        
        setupDisplay: function()
        {
        }    
    });
    And everything looks fine when my app.json contains

    Code:
    "js": [
            {
                "path": "sdk/sencha-touch-all.js"
            },
            {
                "path": "app.js",
                "update": "full"
            }
        ],
    but when I have

    Code:
    "js": [
            {
                "path": "sdk/sencha-touch.js"
            },
            {
                "path": "app.js",
                "update": "full"
            }
        ],
    The label 'Save Profile' on the toggle field dissapears, strange! I have tried putting a requires of 'Ext.Label' but still no luck.
    Last edited by mitchellsimoens; 30 Mar 2012 at 4:15 AM. Reason: added [CODE] tags

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,697
    Answers
    3356
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It is recommended during development to use sencha-touch-debug.js . Here is code that is working for me using sencha-touch-debug.js from the 2.0.0 GA release:

    Code:
    Ext.define('MyApp.view.Profile', {
        extend   : 'Ext.form.FormPanel',
        xtype    : 'profilepage',
        action   : 'profilepage',
        requires : ['Ext.form.FieldSet', 'Ext.field.Toggle'],
    
        config :{
            title   : 'Settings',
            iconCls : 'settings',
            items   : [
                {
                    xtype        : 'fieldset',
                    title        : 'Settings',
                    instructions : 'This will save setup information to your device',
                    items        : [
                        {
                            xtype    : 'togglefield',
                            name     : 'keepprofile',
                            label    : 'Save Profile',
                            maxValue : 1,
                            minValue : 0
                        }
                    ]
                }
            ]
        }
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar