sencha-touch

Simple login form with SenchaTouch

时光总嘲笑我的痴心妄想 提交于 2019-12-21 05:41:17
问题 Just diving into SenchaTouch which seems very promising. I'm building my first application, a simple login form check source http://pastebin.com/8Zddr9cj I'm looking for a way to do the following things : Display 'nice' error message when the login/password is wrong. Can be in red to replace the 'Please enter your credentials); i don't know how to access this property. If login success, close the form and load the application (probably another js file). Quite simple, but i'm a newbie to this,

Working Example of Sencha Fade Effect

空扰寡人 提交于 2019-12-21 05:24:08
问题 Can someone write me the full code to show me how I can fade in and fade out an html element with sencha touch 1? Specifically, I need to know what is the necessary html, javascript and css files to include. I've tried forever to get a simple fade effect to work on a div element, but no success. Either I get method not found errors or nothing happens. No one is answering my questions on the sencha forums. I'm pretty sure i'm just missing something obvious. Additional Notes Here are things I

Sencha Touch 2: tapping Ext.Msg.show that have no buttons

送分小仙女□ 提交于 2019-12-20 06:13:24
问题 I want to display the popup message without any buttons. Ext.Msg.show({ title: '', message: 'Some text goes here...', buttons : [] }); It works fine. How to make it disappeared when you tap on it? 回答1: I tried for you and i got what you want Ext.Msg.show({ title: 'Title', message: 'Some text goes here...', itemId : 'showMsg', buttons : [], listeners:[ { element: 'element', delegate: '', event: 'tap', fn: function() { this.hide(); } }] }); 来源: https://stackoverflow.com/questions/17596316

Treepanel with nested data from JSON

主宰稳场 提交于 2019-12-20 02:52:21
问题 I want to add nested data from JSON into a treepanel. My problem is that the tree is being listed for the number of JSON records (number of divisions, here 1 in the example) without any text. But when I select a child, it shows Uncaught TypeError: Cannot read property 'internalId' of undefined error. This is what I have tried so far. JSON file (schemesInfo.json). { "divisions":[ {"name": "division1","id": "div1","subdivisions":[ {"name": "Sub1Div1","id": "div1sub1","schemes":[ {"name":

FB.getLoginStatus suddenly stopped working on android browser

若如初见. 提交于 2019-12-20 02:34:54
问题 I used to use this code: FB.getLoginStatus(function(response) { .... } But all of a sudden its not working, The callback doesn't fire. Oddly though, only with the android native browser (tested 4.0, 4.1). It works on iPhone, iPad, Chrome & Safari, including Chrome for android. I can't figure out why but its not restricted to my app. For instance I this app built by Sencha is no longer working either (I used it to base my code off): http://www.sencha.com/apps/jog-with-friends actual app url

sencha touch messagebox unclickable

≡放荡痞女 提交于 2019-12-20 01:07:14
问题 In sencha touch we have a little problem with a messagebox. It looks that it's something with android 4.3. On the most devices it's works perfect, but on a device with android 4.3, when the user press the button, the messagebox will not disappear. Ext.define('TestBuild.view.MyPanel', { extend: 'Ext.Panel', config: { items: [ { xtype: 'button', itemId: 'mybutton', text: 'MyButton' } ], listeners: [ { fn: 'onMybuttonTap', event: 'tap', delegate: '#mybutton' } ] }, onMybuttonTap: function(button

Filtering a Ext.data.Store by a particular id returns multiple results

老子叫甜甜 提交于 2019-12-19 11:34:48
问题 I'm trying to filter my list of auditions by show ID but when the show ID is '1' all auditions that have a show Id of '1x' are being returned. Below is my code. Audition Model: Ext.regModel("Audition", { fields: [ {name: "id", type: "integer"}, {name: "show_id", type: "integer"}, {name: "date", type: "string"}, {name: "details", type: "string"} ], belongsTo: 'Show', proxy: { type: 'ajax', url : 'app/data/auditions.json', reader: { type: 'json', root: 'auditions', id : 'id' } }, }); app.stores

Determine if internet connection is available

自古美人都是妖i 提交于 2019-12-19 10:33:25
问题 how do you folks check if the device is connected to the internet in a sencha touch app? 回答1: There's an attribute called navigator.onLine (general browser support, not specific for Sencha) If I'm in a PhoneGap application (which you often are if you're using Sencha Touch), I'd rather use their network.isReachable function, since I've by experience found it more reliable. There's also something called 'Offline events', John Resig describes them on his blog: http://ejohn.org/blog/offline

Java - unparseable date, need format to match “GMT-0400”

不想你离开。 提交于 2019-12-19 10:13:44
问题 I have the following Java: DateFormat formatter = new SimpleDateFormat( "EEE MMM dd yyyy HH:mm:ss zZ (zzzz)", Locale.ENGLISH); Calendar cal = Calendar.getInstance(); cal.set(2011, Calendar.APRIL, 1); out.println(formatter.format(cal.getTime())); out.println(); Date date; try { date = formatter .parse("Fri Apr 01 2011 00:00:00 GMT-0400 (Eastern Daylight Time)"); } catch (ParseException e) { out.println("Failed to parse date: " + e.getMessage()); e.printStackTrace(out); } This is in a servlet,

What are differences between Ext.create() and Ext.define() in SenCha Touch

…衆ロ難τιáo~ 提交于 2019-12-19 05:47:36
问题 I have been learning SenCha Touch for awhile and still feel confused when trying to create a store. In the SenCha Documentation, it says to use Ext.create() Example I tried and it simply doesn't work. For the rest of others, I always see people use Ext.define() to create a store and it works. Now, my question is: what are the differences between them and when/how to use either one of them in a right way? Some demo code is highly appreciated Thanks a lot my friends. 回答1: define is for