script type="text/JavaScript"> var rootPanel; if (navigator.userAgent.match(/iPad/i)) { vIEwport = document.querySelector("Meta[name=vIEwport]"); vIEwport.setAttribute('content','wIDth=980'); } Ext.application({ launch: function () { var contactForm = Ext.create('Ext.form.FormPanel',{ standardsubmit: true,fullscreen: true,items: [{ xtype: 'Titlebar',Title: 'My App',docked: 'top' },{ xtype: 'fIEldset',items: [{ xtype: 'textfIEld',name: 'Loginname',label: 'Login name:' },{ xtype: 'passwordfIEld',name: 'Password',label: 'Password:' },{ xtype: 'hIDdenfIEld',name: 'ReturnUrl',value: '/returnUser.HTML' }] // items },{ xtype: 'toolbar',layout: { pack: 'center' },// layout ui: 'plain',items: [{ xtype: 'button',text: 'reset',ui: 'decline',handler: function (btn,evt) { Ext.Msg.confirm('','Are you sure you want to reset this form?',function (btn) { if (btn === 'yes') { contactForm.setValues({ Loginname: '',Password: '' }); // contactForm() } // switch }); // confirm() } },{ xtype: 'button',text: 'submit',ui: 'confirm',evt) { var values = contactForm.getValues(); contactForm.submit({ url: 'Login',method: 'POST',waitTitle: 'Connecting',waitMsg: 'Sending data...',success: function (form,result) { Ext.Msg.alert('Login succeeded!',result.response.reason); },failure: function (form,result) { Ext.Msg.alert('Login Failed!',result.response.reason); } }); } // handler }] // items (toolbar) }] // items (formpanel) }); // create() } // launch }); // application() $(document).ready(function () { });
我在Ext.Application的启动方法中发出警报但它没有显示.当我在document.ready函数中发出警告时,它确实显示了.我还应该注意它在ipad浏览器上工作,而不是从主屏幕上的图标启动时.
解决方法 我在androID中面临类似的问题实际上在我的情况下问题是因为Ext.Loader未启用我看到你还没有包括它.在Ext.application&之前包含此脚本看看它是否有效Ext.Loader.setConfig({ enabled:true});Ext.application({...});总结
以上是内存溢出为你收集整理的ios – Sencha Touch没有初始化全部内容,希望文章能够帮你解决ios – Sencha Touch没有初始化所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)