Git Product home page Git Product logo

forging-titanium's Introduction

Forging Titanium

Forging Titanium is a weekly screencast on Titanium development topics published by the Appcelerator Developer Relations team.

Sample code and other resources associated with each episode will be found here.

Episode Guide

  • Episode 1: CommonJS Modules ( blog | video )
  • Episode 2: A Cross-Platform Navigation Controller ( blog | video | code )
  • Episode 3: Creating Custom Components ( blog | video | code )
  • Episode 4: Utility Application Template ( blog | video | code )
  • Episode 5: Parse - A Simple Back End Server for Mobile Applications ( blog | video | code )
  • Episode 6: A Single Context Tab Group Template ( blog | video | code )
  • Episode 7: Titanium and Twilio for Cloud Communications ( blog | video | code )
  • Episode 8: Mac (App Store) Attack! Part One ( blog | video | code )
  • Episode 9: Android Intent Cookbook ( blog | video | code )
  • Episode 10: Forms ( blog | video | code )
  • Episode 11: Titanium & Underscore.js ( blog | video | code )
  • Episode 12: Titanium & Date.js ( blog | video | code )
  • Episode 13: Android Notifications ( blog | video | code )
  • Episode 14: Twisti Part 1: Android Module ( blog | video | code )
  • Episode 15: Twisti Part 2: 3D with Three.js ( blog | video | code )
  • Episode 16: Twisti Part 3: Sockets ( blog | video | code )
  • Episode 17: Android, Meet V8 ( blog | video | code )
  • Episode 18: Lost episode, available only on special edition Blu-Ray :)
  • Episode 19: Titanium Studio 1.0.7 ( blog | video | code )
  • Episode 20: What's New in Titanium Mobile 1.8 ( blog | video | code )
  • Episode 21: Box Module for Cloud Storage ( blog | video | code )
  • Episode 22: Path-like Menu ( blog | video | code )
  • Episode 23: TiShadow ( blog | video | code )

forging-titanium's People

Contributors

gonfva avatar iotashan avatar kwhinnery avatar tonylukasavage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forging-titanium's Issues

Episode 10:Forms

I got the null values for TYPE_PICKER AND TYPE_DATE. What's the problem? I added a alert statement after Ti.API.debug(e) within forms.addEventListener. Any suggestion. Thanks.

Episode 10: Forms - textfield.blur() on 'focus' adds space to bottom of window

I added an eventListener to the textfield to make it behave like the rightButton, same exact code, except I'm using "e.source.blur();" instead of "textField.blur();" -- I think the keyboard height is somehow being calculated into this.

After opening the semiModalPicker, the window containing the form height is lengthened, pushing the form up and leaving extra space below it.

Issue when going in and out of windows

Hi Kevin,

I had to comment out line 12 of NavigationController.js to get things to correctly function across the two platforms, not sure exactly what's going on, but if i went, in, out, in, out it would loose it's place.

Also we created a back function where you don't want to go home, w.close() didn't always work so our function checks the platform see:

//go back one window NavigationController
exports.NavigationController.prototype.back = function(w) {
    if(Ti.Platform.osname === 'android') {
        w.close();
    }else{
        this.navGroup.close(w);
    }
};

Episode 7:I can't build

[ERROR] Script Error = *** -[NSCFString substringToIndex:]: Range or index out of bounds at app.js (line 2).

i enterd Twilio APPLICATION_SID and AUTH_TOKEN.

Episode 13: Android Notifications

The code throws the following error:
startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK and essentially starts the app again. I'm trying to use the notification to get back from a background audio app, and it starts the app again, causing to have two audio streams play on top of each other.

Tried various configurations options, but the error remains. Any idea how to set it up to run in a single context?

NavigationController Inside tabGroup??

How would I implement this inside a tabGroup???

I have a tabGroup at app.js and I would like to have a NavigationController inside each tab.

How would I do that? Any ideas or most importantly, examples?

Thanks

ep-002 crashes on android. TestWindow.js line 3 and line 15.

Hi, the demo crashes, because there is an error

line 3 controller is not found. i quess it should be the navController.

line 15 TestWindow is not found... well to solve this you can give the declaration function a name like Like Window and constuct it, using new window.

exports.TestWindow = function Window(navController) {  //named function Window
    var win = Ti.UI.createWindow({
        title:'Window '+navController.windowStack.length, //used the param instead of global
        backgroundColor:'#fff',
        layout:'vertical'
    });

    var add = Ti.UI.createButton({
        title:'Add A New Window',
        height:'50dp',
        width:'200dp',
        top:'20dp'
    });
    add.addEventListener('click', function() {
        navController.open(new Window(navController));  //call named constructor
    });
.....

Now it works fine on Android and iOS.

Regards
Aleksejs Okolovskis

ep-002 crashes on Android

I tried launching the example on Android using SDK 1.7.2, and it crashes. Here's the stacktrace:

E/TitaniumModule( 409): (kroll$1: app://app.js) [1,1055] Error loading module named: NavigationController
E/TitaniumModule( 409): java.lang.IllegalArgumentException: size < 0
E/TitaniumModule( 409): at java.io.ByteArrayOutputStream.(ByteArrayOutputStream.java:65)
E/TitaniumModule( 409): at org.appcelerator.titanium.util.TiStreamHelper.toByteArray(TiStreamHelper.java:106)
E/TitaniumModule( 409): at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:120)
E/TitaniumModule( 409): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216)
E/TitaniumModule( 409): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431)
E/TitaniumModule( 409): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875)
E/TitaniumModule( 409): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397)
E/TitaniumModule( 409): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51)
E/TitaniumModule( 409): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
E/TitaniumModule( 409): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/TitaniumModule( 409): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/TitaniumModule( 409): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/TitaniumModule( 409): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)
E/TitaniumModule( 409): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
E/TitaniumModule( 409): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142)
E/TitaniumModule( 409): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105)
E/TitaniumModule( 409): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306)
E/TitaniumModule( 409): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318)
E/TitaniumModule( 409): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217)
E/TitaniumModule( 409): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223)
E/TitaniumModule( 409): at android.os.Handler.dispatchMessage(Handler.java:95)
E/TitaniumModule( 409): at android.os.Looper.loop(Looper.java:130)
E/TitaniumModule( 409): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86)
E/KrollMethod( 409): (kroll$1: app://app.js) [20,1075] Exception calling kroll method require, invocation: null ]
E/KrollMethod( 409): org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: size < 0 (file:///android_asset/Resources/app.js#2)
E/KrollMethod( 409): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)
E/KrollMethod( 409): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:453)
E/KrollMethod( 409): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875)
E/KrollMethod( 409): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397)
E/KrollMethod( 409): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51)
E/KrollMethod( 409): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
E/KrollMethod( 409): at script(file:///android_asset/Resources/app.js:2)
E/KrollMethod( 409): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/KrollMethod( 409): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/KrollMethod( 409): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/KrollMethod( 409): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)
E/KrollMethod( 409): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
E/KrollMethod( 409): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142)
E/KrollMethod( 409): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105)
E/KrollMethod( 409): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306)
E/KrollMethod( 409): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318)
E/KrollMethod( 409): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217)
E/KrollMethod( 409): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223)
E/KrollMethod( 409): at android.os.Handler.dispatchMessage(Handler.java:95)
E/KrollMethod( 409): at android.os.Looper.loop(Looper.java:130)
E/KrollMethod( 409): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86)
E/KrollMethod( 409): Caused by: java.lang.IllegalArgumentException: size < 0
E/KrollMethod( 409): at java.io.ByteArrayOutputStream.(ByteArrayOutputStream.java:65)
E/KrollMethod( 409): at org.appcelerator.titanium.util.TiStreamHelper.toByteArray(TiStreamHelper.java:106)
E/KrollMethod( 409): at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:120)
E/KrollMethod( 409): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216)
E/KrollMethod( 409): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431)
E/KrollMethod( 409): ... 18 more
E/KrollContext( 409): (kroll$1: app://app.js) [11,1086] Error evaluating source: Wrapped java.lang.IllegalArgumentException: size < 0 (file:///android_asset/Resources/app.js#2)
E/KrollContext( 409): org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: size < 0 (file:///android_asset/Resources/app.js#2)
E/KrollContext( 409): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)
E/KrollContext( 409): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:453)
E/KrollContext( 409): at ti.modules.titanium.TitaniumModuleBindingGen$23.invoke(TitaniumModuleBindingGen.java:875)
E/KrollContext( 409): at org.appcelerator.kroll.KrollProxy$ThisMethod.invoke(KrollProxy.java:397)
E/KrollContext( 409): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51)
E/KrollContext( 409): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
E/KrollContext( 409): at script(file:///android_asset/Resources/app.js:2)
E/KrollContext( 409): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/KrollContext( 409): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/KrollContext( 409): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/KrollContext( 409): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)
E/KrollContext( 409): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
E/KrollContext( 409): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142)
E/KrollContext( 409): at org.appcelerator.titanium.kroll.KrollContext$DefaultEvaluator.evaluateFile(KrollContext.java:105)
E/KrollContext( 409): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:306)
E/KrollContext( 409): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:318)
E/KrollContext( 409): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:217)
E/KrollContext( 409): at org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:223)
E/KrollContext( 409): at android.os.Handler.dispatchMessage(Handler.java:95)
E/KrollContext( 409): at android.os.Looper.loop(Looper.java:130)
E/KrollContext( 409): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86)
E/KrollContext( 409): Caused by: java.lang.IllegalArgumentException: size < 0
E/KrollContext( 409): at java.io.ByteArrayOutputStream.(ByteArrayOutputStream.java:65)
E/KrollContext( 409): at org.appcelerator.titanium.util.TiStreamHelper.toByteArray(TiStreamHelper.java:106)
E/KrollContext( 409): at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:120)
E/KrollContext( 409): at org.appcelerator.titanium.TiBlob.getText(TiBlob.java:216)
E/KrollContext( 409): at ti.modules.titanium.TitaniumModule.require(TitaniumModule.java:431)
E/KrollContext( 409): ... 18 more
E/TiJSError( 409): (kroll$1: app://app.js) [8,1094] ----- Titanium Javascript Runtime Error -----
E/TiJSError( 409): (kroll$1: app://app.js) [1,1095] - In file:///android_asset/Resources/app.js:2,0
E/TiJSError( 409): (kroll$1: app://app.js) [1,1096] - Message: Wrapped java.lang.IllegalArgumentException: size < 0 (file:///android_asset/Resources/app.js#2)
E/TiJSError( 409): (kroll$1: app://app.js) [1,1097] - Source: null

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.