Skip to content

Instantly share code, notes, and snippets.

View aaronksaunders's full-sized avatar

Aaron K Saunders aaronksaunders

View GitHub Profile
/**
* Define our parser class. It takes in some text, and then you can call "linkifyURLs", or one of the other methods,
* and then call "getHTML" to get the fully parsed text back as HTML!
* @param text that you want parsed
*/
function Parser(text) {
var html = text;
var urlRegex = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;
SplitViewNav = {};
// WINDOWS
SplitViewNav.masterWindow = Ti.UI.createWindow({title:'Navigation',backgroundColor:'#898989'});
/* SplitViewNav.masterWindow.add(navGroup); */
SplitViewNav.detailWindow = Ti.UI.createWindow({title:'Welcome to Burnham Parts',backgroundColor:'#fff'});
@aaronksaunders
aaronksaunders / app.js
Created April 12, 2011 04:19
here is an iphone app example with a tabGroup with a modal window that contains a navigation group in appcelerator http://www.screenr.com/nUa more cool stuff -> blog.clearlynnovative.com
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title: 'Tab 1',
backgroundColor: '#fff'
});
@aaronksaunders
aaronksaunders / app.js
Created June 16, 2011 04:10
appcelerator soap suds solution Part Two
Titanium.include('suds.js');
var win = Titanium.UI.createWindow({
backgroundColor:'#fff',
fullscreen:true
});
var url='http://extdata.uspta.com/iphonefap/fapwebsvc.asmx';
var callparams = {
zip: '77042',
@aaronksaunders
aaronksaunders / gist:1039052
Created June 21, 2011 22:09
output from running readme
IMac27Quad:cwti aaronksaunders$ ti new HelloTi com.ci.helloti iphone
/Users/aaronksaunders/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- rocco (LoadError)
from /Users/aaronksaunders/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/aaronksaunders/.rvm/gems/ruby-1.9.2-p180/gems/ti-0.1.9/lib/ti.rb:8:in `<top (required)>'
from /Users/aaronksaunders/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/aaronksaunders/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/aaronksaunders/.rvm/gems/ruby-1.9.2-p180/gems/ti-0.1.9/bin/ti:3:in `<top (required)>'
from /Users/aaronksaunders/.rvm/gems/ruby-1.9.2-p180/bin/ti:19:in `load'
from /Users/aaronksaunders/.rvm/gems/ruby-1.9.2-p180/bin/ti:19:in `<main>'
IMac27Quad:cwti aaronksaunders$
@aaronksaunders
aaronksaunders / app.js
Created June 23, 2011 05:00
use only one instance of the httpClient?
var serviceList = [];
var xhr;
var tmpSvc = fetchServicesByProfile(Titanium.UI.currentWindow.profileid);
for(i=0;i<tmpSvc.length;i++)
{
//Populate serviceList array.
}
function processServiceList(index)
var window = Titanium.UI.createWindow({
});
var popOver_button = Titanium.UI.createButton({
title: "PopOver Button",
width:150,
height:35
})
window.add(popOver_button);
@aaronksaunders
aaronksaunders / app.js
Created July 13, 2011 04:55
beginnings of a NavGroup Module to give me top window and a way to pop all windows to go back home. Working on ability to go to specific window also
Ti.include('my_navgroup.js');
function createWindow(_title) {
var win1=Titanium.UI.createWindow({
width:'100%',
height:'100%',
title:_title,
id:"win-"+_title,
left:0,
top:0,
@aaronksaunders
aaronksaunders / app.js
Created July 13, 2011 18:00
Silly example to show global scope without using Ti.App
Titanium.UI.setBackgroundColor('#ffffff');
var myglobalscope = {}; // global scope
Ti.include( // ADD FILE HERE TO HAVE ACCESS TO GLOBAL SCOPE
'ui.js',
'something_else.js'
);
//Use our custom UI constructors to build the app's UI
myglobalscope.ui.createApplicationTabGroup();
@aaronksaunders
aaronksaunders / app.js
Created July 13, 2011 20:07
Titanium Appcelerator Quickie: Global Variables, Scopes & NO Events, Part 2
Titanium.UI.setBackgroundColor('#ffffff');
var myglobalscope = {}; // global scope
Ti.include( // ADD FILE HERE TO HAVE ACCESS TO GLOBAL SCOPE
'ui.js',
'something_else.js'
);
myglobalscope.ui.createBaseWindow().open();