Gradle — execute multiple commands from task

You can use the second way to declare task types on gradle. task senchaCmdBuild { doLast { exec { workingDir ‘src/main/app/MYAPP’ commandLine ‘cmd’, ‘c’, ‘sencha app build’ } exec { workingDir ‘src/main/app/MYOTHERAPP’ commandLine ‘cmd’, ‘c’, ‘sencha app build’ } } } You need put the exec method in doLast in order to be executed only … Read more

to initComponent() or not to initComponent()

If you do not have a deep understanding of how ExtJS class system work, you may want to follow this: Declare all non-primitive types in initComponent(). Terminology Primitive types – strings, booleans, integers, etc. Non-Primitives – arrays & objects. Explanation If the component you extend is to be created more than once, any non-primitive configs … Read more

How can I let a user download multiple files when a button is clicked?

The best way to do this is to have your files zipped and link to that: The other solution can be found here: How to make a link open multiple pages when clicked Which states the following: HTML: <a href=”#” class=”yourlink”>Download</a> JS: $(‘a.yourlink’).click(function(e) { e.preventDefault(); window.open(‘mysite.com/file1’); window.open(‘mysite.com/file2’); window.open(‘mysite.com/file3’); }); Having said this, I would still … Read more

Javascript: Uploading a file… without a file

If you don’t need support for older browsers, you can use the FormData Object, which is part of the File API: const formData = new FormData(); const blob = new Blob([‘Lorem ipsum’], { type: ‘plain/text’ }); formData.append(‘file’, blob, ‘readme.txt’); const request = new XMLHttpRequest(); request.open(‘POST’, ‘http://example.org/upload’); request.send(formData); File API is supported by all current browsers … Read more

JQuery vs ExtJS [closed]

I have used jQuery extensively and love it. I have reviewed ExtJS on several occasions and would love to have the chance to use this library at some point. This is my take. jQuery The junk drawer of javascript programming. They got everything you need in there, if you’re willing to dig, use some duct … Read more

How to stop a setTimeout loop?

setTimeout returns a timer handle, which you can use to stop the timeout with clearTimeout. So for instance: function setBgPosition() { var c = 0, timer = 0; var numbers = [0, -120, -240, -360, -480, -600, -720]; function run() { Ext.get(‘common-spinner’).setStyle(‘background-position’, numbers[c++] + ‘px 0px’); if (c >= numbers.length) { c = 0; } … Read more

Any suggestions for testing extjs code in a browser, preferably with selenium?

The biggest hurdle in testing ExtJS with Selenium is that ExtJS doesn’t render standard HTML elements and the Selenium IDE will naively (and rightfully) generate commands targeted at elements that just act as decor — superfluous elements that help ExtJS with the whole desktop-look-and-feel. Here are a few tips and tricks that I’ve gathered while … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)