-
29 Mar 2012 4:29 PM #1
Unanswered: Togglefield and Label
Unanswered: Togglefield and Label
I have a view that has the following code
And everything looks fine when my app.json containsCode: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() { } });
but when I haveCode:"js": [ { "path": "sdk/sencha-touch-all.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.Code:"js": [ { "path": "sdk/sencha-touch.js" }, { "path": "app.js", "update": "full" } ],Last edited by mitchellsimoens; 30 Mar 2012 at 4:15 AM. Reason: added [CODE] tags
-
30 Mar 2012 4:18 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote