sencha-touch-2

Sencha Touch Label - does it have a Tap Event?

醉酒当歌 提交于 2019-12-04 07:34:27
I'm trying to build a flashcard app with sencha touch 2. I have a label showing the question, which takes up the entire screen, I want it so that when the user taps on the label the answer shows. Does the label have a 'tap' event? It works when I use a button, but not when I use a label. Another way around is if I can get the button to be transparent on top of a label. Any suggestions? You can do this : label.element.on({ tap : function(e, t) { ... } }); Hope this helps one more way to bind the tap event to the 'label' control using sencha touch. { xtype : 'label', html : 'my name is abc',

Error 'Camera Cancelled' - App Sencha with PhoneGap

谁都会走 提交于 2019-12-04 04:28:39
问题 I'm developping an app that you take pictures with phone and send to social networks. My App is developped with sencha touch 2 and Phonegap. When i try take a picture my app restarts and give me a error 'Camera cancelled'. I try see console.logs but they don't appear... Here's my code: function uploadPhoto(data){ // this is where i will send the image file to server //output image to screen console.log(data); } function fail(msg){ alert(msg); } navigator.camera.getPicture(uploadPhoto, fail, {

How to destroy an inactive view in Sencha Touch

蓝咒 提交于 2019-12-04 04:17:01
i stuck with a problem which is really important i guess. In a simple Sencha Touch App I have many views. My Mainview is a TabPanel with docking icons in the bottom. Sometimes in my App I switch to another views which are outside of the Tabpanel. I don't want the DOM to overload with views, i don't need anymore so i'm searching for a solution to destroy a view, when its inactive. I've tried this, while switching into another view in my controller: this.getMainview().destroy(); It seems that the Mainview gets deleted but I get an error: Uncaught TypeError: Cannot read property 'dom' of null So

Sencha Touch & ExtJS profiles for desktop and mobile in one web project/vhost?

喜你入骨 提交于 2019-12-03 22:15:20
I'm creating a web application with desktop and mobile versions using ExtJS and Sencha Touch. ExtJS 4 and Sencha Touch 2 use an MVC approach, and Sencha Touch 2 incorporates "profiles" for different devices (iPhone, tablet, etc.). ExtJs 4, however, has no notion of profiles. Is it realistically feasible to for dependencies for desktop, iPhone, and iPad versions of the app to live under one vhost, in the same app directory hierarchy? Or, is it generally more acceptable to use different vhosts for desktop (app.com) and mobile sites (m.app.com) when dealing with the Sencha frameworks? I recently

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 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'); } }

What is the difference between xtype and alias?

白昼怎懂夜的黑 提交于 2019-12-03 19:53:56
问题 What is the difference between xtype and alias used in Sencha? They're both seem to be used as shorthand in different places. 回答1: This is really confusing, even Sencha Touch developers team does not have a common opinion. As far as I know, they design this merely for performance. Alias appears earlier than xtype , they create xtype config because if we don't have to parse the string to get the xtype like before, it's faster. Anyway, things like xtype , ptype , ltype or most common, alias

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

Android - Can I set first priority to GPS to get current location in google map?

ぐ巨炮叔叔 提交于 2019-12-03 17:08:48
I want to configure location settings such a way that first priority to get current location using GPS, If GPS is not available than get network provider's location otherwise not. Currently I am getting netwrok provider's settings only. I have set android menifest as below: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> Sencha code to get GEO location: Ext.create('Ext.util.Geolocation', autoUpdate: true,