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 getmappoints(Lat,Long,_callback){ | |
// you need to get the zip information, this is asynchronous also!! so | |
// inside of callback, we will then make the httpRequest | |
Ti.Geolocation.reverseGeocoder(Lat,Long,function(e){ | |
var address = e.places; | |
var zip; | |
zip = address[0].zipcode; | |
// now we have zip, make httprequest |
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 sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
// | |
// create base UI tab and root window | |
// | |
var win1 = Titanium.UI.createWindow({ |
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() { | |
var mainWindow, tableview; | |
function setupWindow() { | |
mainWindow = Titanium.UI.createWindow({ | |
title : 'Tab 1', | |
backgroundColor : '#fff' | |
}); |
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
/** | |
* htp://blog.clearlyinnovative.com | |
* | |
* more appcelerator examples | |
*/ | |
var c = Titanium.Network.createHTTPClient(); | |
c.setTimeout(10000); | |
c.onload = function() { | |
Ti.API.info('IN ONLOAD '); |
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
/** | |
* | |
* Appcelerator Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. | |
* and licensed under the Apache Public License (version 2) | |
*/ | |
#import "ComClearlyinnovativeUtilsModule.h" | |
#import "TiBase.h" | |
#import "TiHost.h" | |
#import "TiUtils.h" | |
#import "Base64Transcoder.h" |
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 a test harness for your module | |
// You should do something interesting in this harness | |
// to test out the module and to provide instructions | |
// to users on how to use it by example. | |
// open a single window | |
var window = Ti.UI.createWindow({ | |
backgroundColor:'white' | |
}); |
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 | |
// blog.clearlyinnovative.com | |
// | |
var mainWindow = Titanium.UI.createWindow({ | |
title : 'Main' | |
}); | |
var dataItems = []; | |
var dataArray = [{ |
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 XHR = Ti.Network.createHTTPClient(); | |
XHR.open("POST", "http://www.clearlyinnovative.com"); | |
// on success, grab the request token | |
XHR.onload = function() { | |
Ti.API.debug("XHR.onload " + XHR.responseText); | |
}; | |
// on error, show message | |
XHR.onerror = function(e) { |
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 sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
// | |
// create base UI tab and root window | |
// |
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
Titanium.Facebook.appid = "YOUR APP ID"; | |
Titanium.Facebook.permissions = ['publish_stream', 'read_stream', "user_checkins", "publish_checkins"]; | |
function doFacebookCheckin(_callback) { | |
var getInfo = function(localCallback) { | |
// GOTCHA - You need to stringify the coordinates or the | |
// the API call will fail, this was a PITA to find | |
var data = { |