sencha-touch

Uncaught-TypeError-Cannot-call-method-substring-of-undefined-sencha-touch-all.js

微笑、不失礼 提交于 2019-12-14 03:18:42
问题 I am a new to Sencha Touch, though I have little knowledge about MVC, I am getting an error while I try to build an application following the video tutorial of Sencha Touch 2 as: Uncaught TypeError: Cannot call method 'substring' of undefined sencha-touch-all.js:35 The code is as follows: app.js: Ext.Loader.setConfig({ enabled: true }); Ext.application({ name: 'SBR', controllers: [ 'Main' ], launch: function(){ Ext.create('Ext.TabPanel',{ fullscreen: true, tabBarPosition: 'bottom', items: [ {

Scope Problems, Sencha, Getting Data passed to view from controller in items?

蓝咒 提交于 2019-12-14 02:11:55
问题 I am passing a record in from the controller via: showDetail: function (list, record) { this.getMain().push({ xtype: 'leaddetail', data: record.data }); }, My View: Ext.define('ApexChat.view.LeadDetail', { extend: 'Ext.Panel', xtype: 'leaddetail', init: function() { debugger; }, config: { styleHtmlContent: true, scrollable: 'vertical', title: 'Details', frame: true, labelwidth: 75, items: [ { xtype: 'fieldset', columnWidth: 0.5, collapsible: true, title: 'Lead Information', defaultType:

sencha touch override ext.ajax

喜欢而已 提交于 2019-12-14 00:41:08
问题 I'm writing a sencha touch app using sencha architect. Because my app do lot of ajax request, most of it need to send 'token' in request header for authentication. So I think of create child class base on Ext.Ajax which always has 'token' in request header. Then I can use this child class without care of the header. MyApp.override.Ajax.request({ ... }) I try define this in app/override/Ajax.js Ext.define('Myapp.override.Ajax', { override: 'Ext.Ajax', headers: { 'token': 'test' } }); I also

How to select the file depending on the browser language?

心已入冬 提交于 2019-12-13 21:39:10
问题 How to select the file depending on the browser language in sencha touch 2? I have 3 files app_de.js, app_en-US.js and app_es.js under my project. I am finding the browser language and loading the file like this: <script type="text/javascript" id="extlocale"> var browserLang = window.navigator.language; // get the browsers language alert(browserLang); var locale = 'en'; // default locale if(browserLang == 'de' || browserLang == 'de-de') //called when the language is german { locale = 'de'; }

Sencha Touch list doesn't load data in browser

蹲街弑〆低调 提交于 2019-12-13 21:24:31
问题 I have a really simple Sencha Touch 2.0.1 app made with Sencha Architect 2.0.0: a list of items loaded from a json file online (here). If I export it to an APK and install it on my droid, it displays perfectly. However if I try it on Chrome or Safari, they say 'Loading...' then display the word 'empty' where the list should be. I get this error in Firebug: GET http://listtest.webs.com/data.json?_dc=1344620739517&page=1&start=0&limit=25 x 166ms (where that 'x' is circled in red, meaning the

how to retrieve xml from a remote server in SenCha Touch

纵然是瞬间 提交于 2019-12-13 21:00:26
问题 Update: Hi, I do not think my question is same as the mentioned question, there are 2 reasons: that question is asking about how to overcome the CORS problem and we all know that from a website, you cannot retrieve data from another website(B) which has different domain unless B has specifically configured its website to allow other to access its data. But in my case, the Cordova/SenCha Touch generated app doesn't have the http protocol when requesting, so it's not the same problem. I want to

Is it possible to open new browser window with custom headers and content?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 19:35:35
问题 I have a Sencha Touch web application. I'm trying to generate a calendar event file and open it in another window hence forcing iOS to ask user to import this event into standard calendar. I can do window.open and then use document.write to generate the file I want, but I also need to specify custom headers with content-type so Safari would recognize it as a calendar file. Is it possible? 回答1: If you redirect to or window.open a data URI, you can specify a MIME type. As a simple test (Safari

Flash support on Android

流过昼夜 提交于 2019-12-13 19:19:37
问题 I have seen at least 20-30 posts on SO regarding this but still haven't got the answer. Can we load an swf file in Android webview or not? I have an HTML page with swf object embedded in it. All HTML content loads except the swf file. I have also installed the Flash Player from Adobe archives on Android device(2.3) but it doesn't work. In this post, it doesn't work. But the same method is working on this post. Why? My aim is to run a sencha app on Android device containing the above HTML file

how to call a listener of view from controller in Extjs

ⅰ亾dé卋堺 提交于 2019-12-13 18:15:42
问题 i have a bar chart in my view where i have a listener which is retrieving the bar column items ,now i have to call that listener from controller here is my code ... This is the listener in my view.. listeners: { itemmousedown: function (obj) { alert(obj.storeItem.data['source'] + ' &' + obj.storeItem.data['count']); } }, and i have to call this listener from my controller.here is my code.. init: function () { this.control({ 'barColumnChart': { //this is the id of the bar chart in my View

Sencha Touch 2: How to override back button on Navigation View

痞子三分冷 提交于 2019-12-13 16:58:44
问题 I was wondering how to ovverride the back button on a navigation view. I tried using onBackButtonTap but it doesnt seem to work http://www.senchafiddle.com/#8zaXf var view = Ext.Viewport.add({ xtype: 'navigationview', onBackButtonTap: function () { alert('Back Button Pressed'); }, //we only give it one item by default, which will be the only item in the 'stack' when it loads items: [ { //items can have titles title: 'Navigation View', padding: 10, //inside this first item we are going to add