Skip to content

Instantly share code, notes, and snippets.

View srahim's full-sized avatar

Sabil Rahim srahim

  • Appcelerator
  • Mountain View, CA
View GitHub Profile
var win = Titanium.UI.createWindow({
backgroundColor:"white",
title:"blah"
});
Ti.API.info("Titanium.buildDate" + Titanium.buildDate);
var data = 'Build: ' + Titanium.version + ' HASH :: ' + Titanium.buildHash + ' ( BUILD DATE :: ' + Titanium.buildDate + ')\n';
@srahim
srahim / app.js
Created August 5, 2011 22:43
The sample code
var win = Ti.UI.createWindow({
title: '1. Look @ White Table',
backgroundColor: '#000'
});
var dat = [];
var table = Ti.UI.createTableView({
data:dat,
separatorColor: 'blue'
});
@srahim
srahim / app.js
Created August 8, 2011 22:36
Test file
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
@srahim
srahim / console output
Created November 14, 2011 20:57
version=1.8.0.1 timestamp=11/10/11 11:14 githash=623790b
[INFO] Server: Apache/1.3.42 (Unix) PHP/5.2.17 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a
[INFO] Connection: close
[INFO] WWW-Authenticate: Basic realm="Restricted Area"
[INFO] Date: Mon, 14 Nov 2011 20:57:19 GMT
@srahim
srahim / app.js
Created November 18, 2011 01:00
maptest
var win1 = Titanium.UI.createWindow({
title:'Map1',
navBarHidden:true
});
function findZoomRegion(points) {
var tmpDeltatLat = 0, tmpDeltatLong = 0, maxDeltatLat = 0, maxDeltatLong = 0, centerLat = 0, centerLong = 0;
for(var i = 0; i <= Math.floor(points.length / 2); i++) {
for(var j = 3; j >= Math.floor(points.length / 2); j--) {
@srahim
srahim / adf
Created December 7, 2011 00:05
example
Titanium.UI.setBackgroundColor('#000');
//creating the window
var win1 = Titanium.UI.createWindow({
title:'win 1',
backgroundColor:'#fff'
});
//add window - navigation bar
var modalWin = Ti.UI.createWindow();
//nav bar
var navmodal = Ti.UI.iPhone.createNavigationGroup({
@srahim
srahim / pull testing 1054
Created December 20, 2011 18:17
build failure
[DEBUG] Detecting modules in /Users/srahim/Library/Application Support/Titanium/modules
[INFO] Performing clean build
[ERROR]
[ERROR] Error: Traceback (most recent call last):
File "/Users/srahim/Library/Application Support/Titanium/mobilesdk/osx/1.9.0.sptramer-timob-6748/iphone/builder.py", line 1418, in main
execute_xcode("iphoneos%s" % iphone_version,args,False)
File "/Users/srahim/Library/Application Support/Titanium/mobilesdk/osx/1.9.0.sptramer-timob-6748/iphone/builder.py", line 1180, in execute_xcode
output = run.run(args,False,False,o)
File "/Users/srahim/Library/Application Support/Titanium/mobilesdk/osx/1.9.0.sptramer-timob-6748/iphone/run.py", line 39, in run
sys.exit(rc)
@srahim
srahim / app.js
Created January 11, 2012 22:34
updated testing file
Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'Wait about 20 seconds for the image to appear',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
@srahim
srahim / app.js
Created January 13, 2012 22:42
testing for scrollview contentoffset
var win = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
});
var scrollView = Titanium.UI.createScrollView({
contentWidth:'auto',
contentHeight:'auto',
top:0,
showVerticalScrollIndicator:true,
@srahim
srahim / gist:1623949
Created January 17, 2012 01:09
app.js
var win = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
});
var scrollView = Titanium.UI.createScrollView({
contentWidth:'auto',
contentHeight:'auto',
top:0,
showVerticalScrollIndicator:true,