Sencha Ext JS 7.7 is Here – Discover What’s New and Exciting – LEARN MORE

Top Support Tips: July 2013

July 1, 2013 107 Views
Show

Increase App Performance by Disabling Image Slicer

Cmd’s image slicer is awesome when you have to compensate for some of Internet Explorer’s CSS3 deficits. However, if you’re not targeting Internet Explorer, you don’t need to go through the image slicing process! You can simply add skip.slice=1 to your .sencha/app/sencha.cfg file and you are good to go, sans slicer.

You can read more about customizing Sencha Cmd here.

Hello Global — Using Ext JS Custom Functions

Users always need to utilize custom functions and variables in a global perspective but knowing how to integrate them can be a little tricky. This is where creating a custom Utilities.js file saves the day. Simply add your custom functions to the statics block of a definition. Then, you can create reusable code that is easily accessible and readily available.

Ext.define(‘MyApp.utils.Utilities’, {
statics: {
MyFunction: function () {
return “hello world”;
},
MyVariable: 100
}
});

In the above example, your custom MyFunction() function could be called like this:MyApp.utils.Utilities.MyFunction();

Or similarly, you can retrieve your custom variable like so:MyApp.utils.Utilities.MyVariable

You can read more about static methods here.

Building Responsive Apps Using Button Sensitivity in Sencha Touch

As device resolution gets bigger and better, some users may experience issues with the button sensitivity in Sencha Touch. Fortunately, we introduced a new event recognizer configuration item called moveDistance in Sencha Touch 2.2.0. MoveDistance determines the maximum distance in pixels a touchstart event can travel and still be considered a tap. On larger devices, the default 8px may be a bit too low, so some taps may be disregarded. To adjust this sensitivity, simply add the following to your application block.

Ext.application({
name : ‘MyApp’,
eventPublishers : {
touchGesture : {
recognizers : {
tap : {
xclass : ‘Ext.event.recognizer.Tap’,
moveDistance : 20 //This was adjusted from the default 8
}
}
}
}
});

You can read more about the moveDistance configuration here.

coming soon

Something Awesome Is

COMING SOON!