Do whatever you want with this code. I offer it without expectation or warranty. No need to credit me in your project or source code. A digital high five would be nice, but is not required.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Label[platform=android]': { | |
color: '#000' // all platforms except Android default to black | |
} | |
'Window': { | |
backgroundColor: '#fff' // white background instead of default transparent | |
} | |
'Window[platform=android]': { | |
modal: false // make android windows all heavyweight |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here's how to add it to a shell profile | |
tialloy() { | |
ti create --id com.testing.$1 --name $1 --workspace-dir . --platforms \ | |
android,blackberry,ios,ipad,iphone,mobileweb,tizen --no-prompt && \ | |
cd $1 && alloy new . && subl . | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var theView = $.someWidgetId.getView('idOfViewInWidget'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get into the master branch | |
git checkout master | |
# create a new branch for the changes and check it out | |
git checkout -b dev_branch | |
# stash the changes until we revert master | |
git stash | |
# go back to master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I'm using this now in my Alloy runtime testing to assert that the | |
// proper styles are getting assigned to Titanium proxy objects. The | |
// deep comparison is necessary for objects like font in the style. So | |
// for my purposes the accuracy of the results far supercedes the lack | |
// of blazing performance with this code. I'm using underscore.js as | |
// it's part of Alloy, but isX() calls could easily be filled out in | |
// a couple lines of JS. | |
// | |
// Obviously due to the use of JSON.stringify() the objects to be | |
// compared need to be JSON serializable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function($) { | |
with (require('jasmine')) { | |
describe('describe', function() { | |
it('it', function() { | |
expect(true).toBeTruthy(); | |
}); | |
}); | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test = require('com.test'); | |
... | |
var testTwo = test.init(); | |
var realView = testTwo.createView(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.index.open(); | |
// create an instance of the model | |
var model = Alloy.createModel('myModel'); | |
// listen for the "error" event | |
model.on('error', function(model, error) { | |
Ti.API.info('error handled: ' + error); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myOnDisplayItem(e) {} | |
var myTemplate = { | |
properties: { | |
onDisplayItem: myOnDisplayItem, | |
selectedBackgroundColor: 'blue', | |
height: 120, | |
}, | |
childTemplates: [ | |
{ |