Skip to content

Instantly share code, notes, and snippets.

View egomez99's full-sized avatar

Eduardo Gomez egomez99

  • Automation Testing
  • Guadalajara, Mexico.
  • 20:34 (UTC -06:00)
View GitHub Profile
@egomez99
egomez99 / app.js
Created June 12, 2012 04:07
Non Stack overflow when circular referencing commonJS modules
var MyWindow = require('somewindow');
MyWindow().open();
@egomez99
egomez99 / app.js
Created June 28, 2012 18:18
Android background service
/*global Ti, alert */
var SECS = 5;
var URL = 'testservice.js';
var win = Ti.UI.createWindow({
fullscreen: false,
navBarHidden: true,
exitOnClose: true
});
@egomez99
egomez99 / app.js
Created July 12, 2012 17:40
Core App module
Ti.UI.setBackgroundColor("#eee");
// Boot the app
require('core').init();
@egomez99
egomez99 / app.js
Created July 31, 2012 01:52
Cloud Users Login method BOTH PLATFORMS
Ti.include('mylogin_window.js');
Notifications.registerDevice();
@egomez99
egomez99 / 1. iPhone 4 Device (3G connection) TRACE Logs - xcode
Created August 2, 2012 02:14
timestamps to track time between iterations, parsing and UI actions
[INFO] Here On Biz/1.0.1 (2.0.2.GA.2ff31a3)
[DEBUG] loading: /var/mobile/Applications/7863E8CA-4A99-4431-8079-57F1EC245E69/Here On Biz.app/app.js, resource: app_js
[DEBUG] loading: /var/mobile/Applications/7863E8CA-4A99-4431-8079-57F1EC245E69/Here On Biz.app/helperDebugger.js, resource: helperDebugger_js
[INFO] LOG [ total time (ms) 28 mem use 0.015625 ] >>>> START <<<<
[TIMESTAMP] 365565821.493912 0. LOG [ total time (ms) 28 mem use 0.015625 ] >>>> START <<<<
[TIMESTAMP] 365565821.495050 >>>> START <<<<
[INFO] LOG [ total time (ms) 99 mem use -2.4453125 ] Configure Defaults
[TIMESTAMP] 365565821.561562 0. LOG [ total time (ms) 99 mem use -2.4453125 ] Configure Defaults
[TIMESTAMP] 365565821.562647 app.js > Configure Defaults
[INFO] LOG [ total time (ms) 143 mem use -1.94921875 ] PostCheckins
@egomez99
egomez99 / login.js
Created August 2, 2012 15:46
[ERROR] Script Error = 'undefined' is not an object (evaluating 'this._cp.tabs') at tabgroup.js (line 275).
/**
* Open the login window for user to get access key!
* Once user has access key, will be redirect to the Active tab
*
* @param tabGroup
*/
function showLoginWindow()
{
purgeAll();
OF.mobile.UI.TabGroup.closeAllWindows();
@egomez99
egomez99 / table.js
Created August 16, 2012 18:06
Resources/windows/pushNotifications/
Ti.include(
'notify.js',
'settings.js',
'subscribe.js',
'unsubscribe.js'
);
windowFunctions['Push Notifications'] = function () {
var win = createWindow();
var offset = addBackButton(win);
@egomez99
egomez99 / app.js
Created September 26, 2012 21:28
Null vars: Release proxies
var navigator = require ('ui/navigator').createNavigator(),
mainWindow = require('ui/mainWindow').mainWindow();
navigator.open( mainWindow );
setTimeout(function(){
navigator.close(mainWindow);
//mainWindow = null;
//navigator = null;
}, 15000);
@egomez99
egomez99 / app.js
Created October 20, 2012 03:25
Convert to BLOB
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var data = [];
// populate array with rows
for (var i = 0; i < 40; i++)
{
var row = createRow(i);
@egomez99
egomez99 / app.js
Created November 10, 2012 03:11
OnNewIntent - Android Local Notification
var win = Ti.UI.createWindow({fullscreen:false});
//create some simple UI
var textfield = Ti.UI.createTextField({width:300, height:'auto', top:40, left:20, hintText:'enter message'});
var button = Ti.UI.createButton({title:'Send Notification', width:'auto', top:120, left:20, height:'auto'});
var label = Ti.UI.createLabel({width:'auto', top:200, left:20, height:'auto', width:200, text:'Message from intent:'});
var msgLabel = Ti.UI.createLabel({width:'auto', top:240, left:20, height:'auto', width:200, backgroundColor:'lightgrey', text:'---'});
win.add(textfield);
win.add(button);