Skip to content

Instantly share code, notes, and snippets.

E/TiJSError(12660): (main) [166,4426] ----- Titanium Javascript Runtime Error -----
E/TiJSError(12660): (main) [0,4426] - In ti:/window.js:284,15
E/TiJSError(12660): (main) [0,4426] - Message: Uncaught TypeError: Object #<ActivityWindow> has no method 'on'
E/TiJSError(12660): (main) [1,4427] - Source: this.window.on("open", function () {
E/V8Exception(12660): Exception occurred at ti:/window.js:284: Uncaught TypeError: Object #<ActivityWindow> has no method 'on'
E/JNIUtil (12660): !!! Unable to convert unknown Java object class 'org.appcelerator.kroll.KrollRuntime$1' to Js value !!!
E/JNIUtil (12660): !!! Unable to convert unknown Java object class 'org.appcelerator.kroll.KrollRuntime$1' to Js value !!!
E/JNIUtil (12660): !!! Unable to convert unknown Java object class 'org.appcelerator.kroll.KrollRuntime$1' to Js value !!!
I/ActivityManager(24380): Displayed ti.paymobile/ti.actionbar.TiTabActivity: +1s534ms
W/TiApplication(12660): (KrollRuntimeThread) [337,4764] Registering module with name already in use.
body {
background: url("http://itblog.ge/pin/map-background.png")
}
* {
padding: 0;
margin: 0;
-webkit-touch-callout: none;
-webkit-user-select: none; /* Disable selection/Copy of UIWebView */
}
@otarza
otarza / gist:3186929
Created July 27, 2012 08:59
map.html
<html>
<head>
<title>OpenLayers Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="http://openlayers.org/api/2.12/OpenLayers.js" type="text/javascript"></script>
<style type="text/css">
body {
background: url("http://itblog.ge/pin/map-background.png")
Titanium.Geolocation.getCurrentPosition(function (e) {
if (e.success && e.coords) {
webview.evalJS("reloadMap(" + JSON.stringify(e.coords) + ")");
var banksJson = require('mapsAjax').banksJson;
banksJson(function (points) {
webview.evalJS("putMarker(" + JSON.stringify(points) + ")");
});
}
@otarza
otarza / PullToRefreshListViewSampleActivity.java
Created June 20, 2012 12:18
Pull To Refresh List View Example
package eu.erikw.pulltorefresh.sample;
import java.util.ArrayList;
import android.app.Activity;
import android.os.Bundle;
import android.view.ViewGroup.LayoutParams;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import eu.erikw.PullToRefreshListView;
@otarza
otarza / build.xml
Created June 19, 2012 11:01
Titanium module build xml
<project name="calc" default="cleanup">
<description>
Ant build script for Titanium Android module calc
</description>
<property name="modcopy" location="/home/oto/TitaniumStudioWorkspace1/tweetie/modules/android"/>
<property name="module.archive" value="org.appcelerator.calc-android-0.1.zip" />
<property name="build.dir" value="${basedir}/build"/>
// 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();
var win = Ti.UI.currentWindow;
var alertDialog = Titanium.UI.createAlertDialog({
title : 'System Message',