This file contains 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
// INcluding memory management utils. | |
Ti.include('utils.js'); | |
// root window. | |
var win = Ti.UI.createWindow({ | |
backgroundColor:'white', | |
exitOnclose:true, | |
}); | |
This file contains 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
/** | |
* @aaronksaunders | |
* | |
* See more Appcelerator Information on Company Blog | |
* blog.clearlyinnovetiove.com | |
* | |
*/ | |
var TiParse = function(options) { | |
FB = { | |
init: function() { |
This file contains 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
// This is an example of use. | |
// Here we use the new Bearer Token thats make it possible to get tweets without user login | |
// More info on Bearer here: https://dev.twitter.com/docs/auth/application-only-auth | |
// Full Codebird API is here: https://github.com/mynetx/codebird-js | |
var Codebird = require("codebird"); | |
var cb = new Codebird(); | |
cb.setConsumerKey('CONSUMER_KEY', 'CONSUMER_SECRET_KEY'); | |
var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null); |
This file contains 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 win = Ti.UI.createWindow(); | |
// Main Window | |
var twitter = Ti.UI.createButton({ | |
title : 'Set Tweet' | |
}); | |
var accessToken = null; | |
var accessTokenSecret = null; | |
///////////LOAD ACCESS TOKEN |
This file contains 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 hsv2rgb = function(hsv) { | |
var h = hsv.hue, s = hsv.sat, v = hsv.val; | |
var rgb, i, data = []; | |
if (s === 0) { | |
rgb = [v, v, v]; | |
} else { | |
h = h / 60; | |
i = Math.floor(h); | |
data = [v * (1 - s), v * (1 - s * (h - i)), v * (1 - s * (1 - (h - i)))]; | |
switch(i) { |
This file contains 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
/** | |
Create Thumbnail of Video File | |
*/ | |
var movie = Titanium.Media.createVideoPlayer({ | |
contentURL:FILEURL, | |
movieControlStyle: Titanium.Media.VIDEO_CONTROL_EMBEDDED, | |
scalingMode:Titanium.Media.VIDEO_SCALING_ASPECT_FILL, | |
width:100, | |
height:100 | |
}); |
This file contains 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 rootWin = Ti.UI.createWindow(); | |
var navGroup = Ti.UI.iPhone.createNavigationGroup({ | |
window: rootWin | |
}); | |
var button = Ti.UI.createButton({ | |
title: 'Open ListView Tests' | |
}); | |
button.addEventListener('click', function() { | |
openTestsWindow(); | |
}); |
This file contains 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 rootWin = Ti.UI.createWindow(); | |
var navGroup = Ti.UI.iPhone.createNavigationGroup({ | |
window: rootWin | |
}); | |
var button = Ti.UI.createButton({ | |
title: 'Open ListView Tests' | |
}); | |
button.addEventListener('click', function() { | |
openTestsWindow(); | |
}); |
This file contains 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 Sync(model, method, opts) { | |
var table = model.config.adapter.collection_name, columns = model.config.columns, resp = null; | |
switch (method) { | |
case "create": | |
// properly set the model id on object | |
// and on the model.attributes notice use of 'idAttribute' | |
// property to account for something other than 'id' being | |
// used to store the actual attribute | |
if (!model.id) { | |
model.id = guid(); |
This file contains 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
NSString *link = [NSString stringWithFormat:@"http://www.mobtwist.com"]; | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: link]]; |