sencha-touch

Why should I use Ext.dispatch rather than calling controller code directly?

ⅰ亾dé卋堺 提交于 2019-12-04 02:40:28
When using the [relatively new] MVC bits in Sencha Touch I find that 90% of my dispatch calls look something like: Ext.dispatch({ controller: "customers", action: 'show', record: record }); That's fine, and I like delegating the flow to the seperate controller code, rather than complicated paths of events, but I have yet to see any advantage over just doing something like: controllers.customers.show({ record: record }); Which is shorter and cleaner. I feel like I am just following the Ext.dispatch pattern for the sake of it. My app doesn't benefit from push/pop url history for state, and that

Multiple Background Images using Sass / Compass

白昼怎懂夜的黑 提交于 2019-12-04 00:37:59
问题 The following generates a base64 inline-image using sass/compass: background-image:inline-image("paper.jpg", 'image/jpg'); Is there a way to do multiple background images, or do I have to precompress them myself to do it? Thanks. 回答1: The inline-image function just outputs the url() string, so you can use multiple by doing this: background: inline-image("front-image.jpg", 'image/jpg') no-repeat, inline-image("back-image.jpg", 'image/jpg') repeat-x And you'll get the following css: background:

Insert the data in phonegap database table?

北战南征 提交于 2019-12-03 21:52:21
In my application, i want to insert the value in the table. i have created the databse in onDeviceReady() method in the index.html file. <!DOCTYPE html> <!-- Auto Generated with Sencha Architect --> <!-- Modifications to this file will be overwritten. --> <html> <head> <meta name="generator" content="HTML Tidy, see www.w3.org"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Teritree</title> <script type="text/javascript" id="phonegap" src= "cordova-2.0.0.js"> </script> <script type="text/javascript" src="barcodescanner.js"> </script> <script src="sencha-touch-all.js

Sencha Touch: Ext.DataView not showing store data

不打扰是莪最后的温柔 提交于 2019-12-03 21:47:06
I know the typical reason for a DataView to be blank is because the model or JSON is wrong. From what I can tell, mine is right... so I'm not sure why my DataView is blank. Controller rpc.controllers.AboutController = new Ext.Panel({ id: 'rpc-controllers-AboutController', title: 'About', iconCls: 'info', layout: 'card', scroll: 'vertical', items: [rpc.views.About.index], dockedItems: [{ xtype: 'toolbar', title: 'RockPointe Church | Mobile' }], listeners: { activate: function () { if (rpc.stores.AboutStore.getCount() === 0) { rpc.stores.AboutStore.load(); } } } }); View rpc.views.About.index =

Sencha Touch 2 event: painted vs show?

China☆狼群 提交于 2019-12-03 20:29:05
I have a question regarding the show event. in my application I'm handling the painted event of my panel like this: Ext.define('mvcTest.controller.Test', { extend: 'Ext.app.Controller', config: { refs: { panel: '#testpanel' }, control:{ panel: { painted: 'onPainted' } } }, onPainted: function(){ alert('painted'); } }); the docu say's, that there is also a "show" event, but it get not fired at all: Ext.define('mvcTest.controller.Test', { extend: 'Ext.app.Controller', config: { refs: { panel: '#testpanel' }, control:{ panel: { show: 'onShow' } } }, onShow: function(comp, obj){ alert('show'); } }

A solid tutorial for Sencha Touch V2 [closed]

旧时模样 提交于 2019-12-03 18:22:02
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I found a great tutorial on creating an MVC App from Scratch using Sencha Touch V1.1 but unfortunately it isn't all that applicable to

Animating dimensions in Sencha Touch 2

此生再无相见时 提交于 2019-12-03 17:31:10
I'm trying to animate the height of a dataview, but it's currently just sliding the panel around the viewport instead of keeping it in place and changing it's height. The code is as follows: Ext.Anim.run(el, 'slide', { from: { height: height }, to: { height: newHeight }, out: false, direction: 'up', easing: 'ease-out', duration: 1000 }); For instance, height=200, newHeight=100 will result in the dataview dropping immediately so that it's top is at 200px below the viewport, and then animating back to the top of the viewport. How can I get it to change the height? Thanks. Try using Ext.Animator

Working Example of Sencha Fade Effect

蓝咒 提交于 2019-12-03 17:26:49
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 tried and why they failed: <!DOCTYPE html> <html> <head> <title>Nested List - Source Code Browser</title

Simple login form with SenchaTouch

天大地大妈咪最大 提交于 2019-12-03 17:26:19
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, 1) Fieldset has a method called setInstructions which you can call to update the instructions. So, you

How to remove particular view from navigation stack in sencha touch?

给你一囗甜甜゛ 提交于 2019-12-03 16:25:10
I'm pushing views like this this.up('navView').push({xtype: 'myView'}) How can I remove particular view, which is in the middle of navigation stack? At least I should get rid of this warning [WARN][Ext.Component#constructor] Registering a component with a id (listxyz) which has already been used. Please ensure the existing component has been destroyed (Ext.Component#destroy(). Before pushing a view check weather the view already exists, and destroy it if its already there, so you wont get those warnings and can navigate easily. if(Ext.getCmp('myView')){ Ext.getCmp('myView').destroy(); } //Push