Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Titanium Forum

I have noticed some demand for a Titanium specific forum with the usual forum structure instead of the Q&A structure here at Appcelerator.

So I have just launched a dedicated Titanium forum -

www.talktitanium.com

Drop by and discuss Titanium.

Thanks
Sam

— asked April 16th 2010 by Sam Shupac
  • discuss
  • forum
  • talk
  • titanium
1 Comment
  • And you've forgotten to put http:// in your link so it doesn't work. Not very encouraging.

    — commented June 16th 2011 by Miloš Rašic

18 Answers

  • Hi Sam,

    Whilst it may be a little frustrating to navigate this forum it does keep the Titanium community in one place. I've used other forums where users have decided to create their own offshoot … it becomes even more frustrating because now there are more places to look for answers.

    Whilst the idea of a separate forum may at first seem a good idea (I'd considered it myself), it will only serve to split the community and make it even more difficult for users of Titanium to get the answers they are looking for.

    The guys at Appcelerator are very unlikely to have the time to provide support on anything other than their own forum. And personally, I wouldn't expect them to. They have worked hard to get where they are now to bring the Titanium platform to us, to build their own community of users and provide answers on this forum.

    Cheers

    Mark

    — answered April 16th 2010 by Mark Poston
    permalink
    0 Comments
  • Quite frankly, except for the different categories i don't think that's a big improvement. I personally would prefer a classic phpbb based forum. Like this one: http://wxforum.shadonet.com

    @Mark: I haven't seen much help from the Titanium guys here, at least all problems i have (and quite a few more people) are still unsolved/unanswered. They obviously try to get more people into premium support…

    — answered April 16th 2010 by Eric Jensen
    permalink
    0 Comments
  • There are a lot of unanswered questions agreed, but the issues that I have had, mainly around support for XML have been identified by the developers on this forum and then resolved. So from my point of view this forum has been an effective means of communicating them to other users and the developers.
    What technology drives this forum? Can it be used in other ways/other features that can be suggested to Appcelerator that will make things better?
    Regards
    Mark

    — answered April 17th 2010 by Mark Poston
    permalink
    0 Comments
  • I'd be puzzled to hear of a negative response to more sites springing-up around the web, spreading the word about Titanium. In the grander-scheme it's a sign of success and would, I believe act as a means of drawing more new developers to appcelerator.com to find out more.

    To me, It'd be sign of a maturing community and an inevitable consequence of things taking-off.

    Certainly, there should be no sign at all of such things being taken as a sign of ingratitude.

    Cheers,
    Chris.

    — answered April 19th 2010 by Chris Reed
    permalink
    0 Comments
  • Can you add a fireEvent "tick" for animate in UI View?
    If we have a event, we can use for implement command for every loop tick.
    Example move ui and reduce alpha at same time.

    — answered November 9th 2011 by Giovanni Amati
    permalink
    0 Comments
  • var lat = '';
    var lon = '';
    Ti.Geolocation.purpose = "Recieve User Location";
    if(Titanium.Network.networkType == Titanium.Network.NETWORK_NONE){
    var alertDialog = Titanium.UI.createAlertDialog({
    title: 'Connection Error!',
    message: 'Check Your Network Connection.',
    buttonNames: ['OK']
    });
    alertDialog.show();
    }

    if(Titanium.Network.networkType != Titanium.Network.NETWORK_NONE){
    var win = Titanium.UI.createWindow({
    title:'Your Location',
    BackgroundColor:'#fff'
    });

    Titanium.Geolocation.getCurrentPosition(function(e) {
    if (e.error) {
    Ti.API.log('error: ' + JSON.stringify(e.error) );
    return;
    }
    Ti.API.debug(JSON.stringify(e));
    alert(JSON.stringify(e));
    lon = e.coords.longitude;
    lat = e.coords.latitude;

    });

    var mapview = Titanium.Map.createView({
    mapType: Titanium.Map.STANDARD_TYPE,
    region: {latitude:lat, longitude:lon, latitudeDelta:0.5, longitudeDelta:0.5},
    animate:true,
    regionFit:true,
    userLocation:true
    });

    win.add(mapview);
    win.open();
    }

    When I try to run this code on android emulator it shows me following error…..

    please help me….

    [ERROR][TiApplication( 414)] (main) [1043,5372] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.Demo/com.appcelerator.Demo.DemoprojectActivity}: java.lang.NumberFormatException: ; Titanium 2.0.2,2012/05/30 10:21,2ff31a3
    [ERROR][TiApplication( 414)] java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.Demo/com.appcelerator.Demo.DemoprojectActivity}: java.lang.NumberFormatException:
    [ERROR][TiApplication( 414)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
    [ERROR][TiApplication( 414)] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    [ERROR][TiApplication( 414)] at android.app.ActivityThread.access$2300(ActivityThread.java:125)
    [ERROR][TiApplication( 414)] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    [ERROR][TiApplication( 414)] at android.os.Handler.dispatchMessage(Handler.java:99)
    [ERROR][TiApplication( 414)] at android.os.Looper.loop(Looper.java:123)
    [ERROR][TiApplication( 414)] at android.app.ActivityThread.main(ActivityThread.java:4627)
    [ERROR][TiApplication( 414)] at java.lang.reflect.Method.invokeNative(Native Method)
    [ERROR][TiApplication( 414)] at java.lang.reflect.Method.invoke(Method.java:521)
    [ERROR][TiApplication( 414)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    [ERROR][TiApplication( 414)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    [ERROR][TiApplication( 414)] at dalvik.system.NativeStart.main(Native Method)
    [ERROR][TiApplication( 414)] Caused by: java.lang.NumberFormatException:
    [ERROR][TiApplication( 414)] at org.apache.harmony.luni.util.FloatingPointParser.parseDouble(FloatingPointParser.java:267)
    [ERROR][TiApplication( 414)] at java.lang.Double.parseDouble(Double.java:287)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.util.TiConvert.toDouble(TiConvert.java:447)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.util.TiConvert.toDouble(TiConvert.java:463)
    [ERROR][TiApplication( 414)] at ti.modules.titanium.map.TiMapView.doSetLocation(TiMapView.java:611)
    [ERROR][TiApplication( 414)] at ti.modules.titanium.map.TiMapView.processProperties(TiMapView.java:558)
    [ERROR][TiApplication( 414)] at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:737)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:533)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:525)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:503)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:540)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:525)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:503)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:619)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:310)
    [ERROR][TiApplication( 414)] at android.os.Handler.dispatchMessage(Handler.java:95)
    [ERROR][TiApplication( 414)] at org.appcelerator.kroll.common.TiMessenger.dispatchMessage(TiMessenger.java:365)
    [ERROR][TiApplication( 414)] at org.appcelerator.kroll.common.TiMessenger.dispatchPendingMessages(TiMessenger.java:350)
    [ERROR][TiApplication( 414)] at org.appcelerator.kroll.common.TiMessenger$2.getResult(TiMessenger.java:235)
    [ERROR][TiApplication( 414)] at org.appcelerator.kroll.common.TiMessenger.sendBlockingMessage(TiMessenger.java:262)
    [ERROR][TiApplication( 414)] at org.appcelerator.kroll.common.TiMessenger.sendBlockingRuntimeMessage(TiMessenger.java:187)
    [ERROR][TiApplication( 414)] at org.appcelerator.kroll.KrollProxy.fireSyncEvent(KrollProxy.java:470)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:405)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:162)
    [ERROR][TiApplication( 414)] at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:56)
    [ERROR][TiApplication( 414)] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    [ERROR][TiApplication( 414)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
    [ERROR][TiApplication( 414)] … 11 more
    [ERROR][AndroidRuntime( 414)] FATAL EXCEPTION: main
    [ERROR][AndroidRuntime( 414)] java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.Demo/com.appcelerator.Demo.DemoprojectActivity}: java.lang.NumberFormatException:
    [ERROR][AndroidRuntime( 414)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
    [ERROR][AndroidRuntime( 414)] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    [ERROR][AndroidRuntime( 414)] at android.app.ActivityThread.access$2300(ActivityThread.java:125)
    [ERROR][AndroidRuntime( 414)] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    [ERROR][AndroidRuntime( 414)] at android.os.Handler.dispatchMessage(Handler.java:99)
    [ERROR][AndroidRuntime( 414)] at android.os.Looper.loop(Looper.java:123)
    [ERROR][AndroidRuntime( 414)] at android.app.ActivityThread.main(ActivityThread.java:4627)
    [ERROR][AndroidRuntime( 414)] at java.lang.reflect.Method.invokeNative(Native Method)
    [ERROR][AndroidRuntime( 414)] at java.lang.reflect.Method.invoke(Method.java:521)
    [ERROR][AndroidRuntime( 414)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    [ERROR][AndroidRuntime( 414)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    [ERROR][AndroidRuntime( 414)] at dalvik.system.NativeStart.main(Native Method)
    [ERROR][AndroidRuntime( 414)] Caused by: java.lang.NumberFormatException:
    [ERROR][AndroidRuntime( 414)] at org.apache.harmony.luni.util.FloatingPointParser.parseDouble(FloatingPointParser.java:267)
    [ERROR][AndroidRuntime( 414)] at java.lang.Double.parseDouble(Double.java:287)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.util.TiConvert.toDouble(TiConvert.java:447)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.util.TiConvert.toDouble(TiConvert.java:463)
    [ERROR][AndroidRuntime( 414)] at ti.modules.titanium.map.TiMapView.doSetLocation(TiMapView.java:611)
    [ERROR][AndroidRuntime( 414)] at ti.modules.titanium.map.TiMapView.processProperties(TiMapView.java:558)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:737)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:533)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:525)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:503)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:540)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:525)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:503)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:619)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:310)
    [ERROR][AndroidRuntime( 414)] at android.os.Handler.dispatchMessage(Handler.java:95)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.kroll.common.TiMessenger.dispatchMessage(TiMessenger.java:365)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.kroll.common.TiMessenger.dispatchPendingMessages(TiMessenger.java:350)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.kroll.common.TiMessenger$2.getResult(TiMessenger.java:235)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.kroll.common.TiMessenger.sendBlockingMessage(TiMessenger.java:262)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.kroll.common.TiMessenger.sendBlockingRuntimeMessage(TiMessenger.java:187)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.kroll.KrollProxy.fireSyncEvent(KrollProxy.java:470)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:405)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:162)
    [ERROR][AndroidRuntime( 414)] at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:56)
    [ERROR][AndroidRuntime( 414)] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    [ERROR][AndroidRuntime( 414)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
    [ERROR][AndroidRuntime( 414)] … 11 more

    — answered June 19th 2012 by sachin wandre
    permalink
    0 Comments
  • We need to develop an application for blackberry that runs as a background service. It's possible?

    — answered August 6th 2013 by Alessandro Paglia
    permalink
    0 Comments
  • Error android - Alloy.Collections.todo.fetch()
    Ei, estou usando o método fetch do collections, para IOS (Iphone) funciona perfeitamente, mas se rodar para android exibe mensagem de erro inesperado. Alguém sabe me dizer porque ou qual a solução?

    — answered October 9th 2013 by Fabio de Souza
    permalink
    0 Comments
  • Hi

    I am developing in Alloy and I got stuck with some issues when dynamically adding new rows to existing XML table.

    The following is my code:

    Controller

    var db = require('Database');
    
    db.connect();
    var providers = db.select({
        table: 'providers',
        fields: '*',
    });
    db.close();
    
    $.providerList.open();
    
    var row = [];
    var label = [];
    for(var i in providers.values)
    {
        label[i] = Ti.UI.createLabel({
            text: providers.values[i][1]
        })
        row[i] = Ti.UI.createTableViewRow({
            className: 'providerCell',
            text: providers.values[i][1],
        });
    
        row[i].add(label[i]);
        $.providerTable.appendRow(row[i]);
    }
    

    View

    <Alloy>
        <Window class="window">
            <ScrollView title="Provider List" id="providerListContainer" class="list provider scrollView">
                <TableView id="providerTable">
                        <HeaderView>
                            <Label>Table Header</Label>
                        </HeaderView>
                        <TableViewRow>
                            <Label>ladida</Label>
                        </TableViewRow>
                </TableView>
            </ScrollView>
        </Window>
    </Alloy>
    

    Style

    'TableViewRow': {
        backgroundColor: 'red',
        color: '#333',
        height: 52,
    },
    
    ".providerCell": {
        backgroundColor: 'blue',
    }
    

    The styling is working perfectly on the XML based row but not with Ti.UI.createTableViewRow

    — answered March 4th 2014 by Kenneth Clausen
    permalink
    0 Comments
  • I am truly sorry that was a mistake posting this here.

    — answered March 4th 2014 by Kenneth Clausen
    permalink
    2 Comments
    • ![alt text] (http://picpaste.com/Screen_Shot_2014-08-20_at_5.29.16_pm-o0JDLk7t.png)

      — commented August 20th 2014 by Murtuza Saifee
    • [inline link text] (http://picpaste.com/Screen_Shot_2014-08-20_at_5.29.16_pm-o0JDLk7t.png)

      — commented August 20th 2014 by Murtuza Saifee
  • alt text

    — answered August 20th 2014 by Murtuza Saifee
    permalink
    3 Comments
    • You link to an image on your desctop pc …

      — commented August 20th 2014 by Rainer Schleevoigt
    • How should I do that? Can u plz help me.

      — commented August 20th 2014 by Murtuza Saifee
    • You must upload you image to i.e. http://imgur.com/ and then you must link the raw image url

      — commented August 20th 2014 by Rainer Schleevoigt
  • Hello everyone! am new to titanium
    I installed this:npm install mcrypt
    and I put this code in alloy.js

    var mcrypt = require('mcrypt');
    
    var algos = mcrypt.getAlgorithmNames();
    console.log(algos);
    

    I get an error 404, says that the library does not exist (mcrypt.js)
    However, I have created an application nodejs external titanium and everything works fine.
    why can not I use library node in titanium?
    Thanks.

    — answered December 8th 2014 by iacopo guarneri
    permalink
    0 Comments
  • sorry, I was wrong to post here my question

    — answered December 8th 2014 by iacopo guarneri
    permalink
    1 Comment
    • In most cases you cannot use nodeJs module because a part of nodeJS is native (i.e. net)

      — commented December 8th 2014 by Rainer Schleevoigt
  • You can use this : https://code.google.com/p/js-mcrypt/source/browse/trunk/mcrypt.js

    — answered December 8th 2014 by Rainer Schleevoigt
    permalink
    0 Comments
  • hello, I tried that script, but it gave me different results from php

    — answered December 8th 2014 by iacopo guarneri
    permalink
    3 Comments
    • We have to posibilities: php or js is wrong. We can decide this if you send us code snippets.

      — commented December 8th 2014 by Rainer Schleevoigt
    • Js:
      mcrypt.Encrypt("abcdefghilmnopqrs", "0000000000000000", "test", "rijndael-128", "cbc")
      HEX result: a4d2bc8028caf83ccd9254f98b27a06d70df29534731eb937b3dee63713a9

      Php:
      mcrypt_encrypt(MCRYPT_RIJNDAEL_128, "test", "abcdefghilmnopqrs", MCRYPT_MODE_CBC, "0000000000000000")
      HEX result: eec0859528e3c64ba1b16a3ecbc76d0953a305157b48cb7d9ecf716b466da72

      — commented December 8th 2014 by iacopo guarneri
    • JS

      mcrypt.Encrypt("abcdefghilmnopqrs", "0000000000000000", "test", "rijndael-128", "cbc");
      // HEX result: a4d2bc8028caf83ccd9254f98b27a06d70df29534731eb937b3dee63713a9
      

      PHP

      mcrypt_encrypt(MCRYPT_RIJNDAEL_128, "test", "abcdefghilmnopqrs", MCRYPT_MODE_CBC, "0000000000000000");
      //HEX result: eec0859528e3c64ba1b16a3ecbc76d0953a305157b48cb7d9ecf716b466da72
      

      Do you have tested the order of parameters?

      — commented December 8th 2014 by Rainer Schleevoigt
  • this should be the right order. you work?

  • thank you, I solved.
    in this link it says how to solve in practice was too short the key

    http://stackoverflow.com/questions/18786025/mcrypt-js-encryption-value-is-different-than-that-produced-by-php-mcrypt-mcryp

    — answered December 8th 2014 by iacopo guarneri
    permalink
    2 Comments
    • Please mark my answer as solving.

      — commented December 8th 2014 by Rainer Schleevoigt
    • hello, thank you again. excuse the question .. how the mark as solved?

      — commented December 9th 2014 by Iacopo Guarneri
  • hello good morning to all 'm creating my first database and I get error, and not what they could be doing wrong and anyone knows could help me correct my mistake please thank you for your help

    the example is as follows:

    var db = Ti.Database.open('ejemplo.sqlite');
    var query ='CREATE TABLE IF NOT EXISTS contactos';
    query ='(id_contacto INTEGER PRIMARY KEY NOT NULL';
    query +='AUTOINCREMENT';
    query +='nombre VARCHAR(32)NOT NULL,';
    query +='apellido VARCHAR(64)NOT NULL,';
    query +='telefono VARCHAR(16))';
    db.execute(query);

    The error is as follows leaving me out in red letters :

    [ERROR] : TiExceptionHandler: (main) [133,133] —– Titanium Javascript Runtime Error —–
    [ERROR] : TiExceptionHandler: (main) [1,134] - In app.js:8,4
    [ERROR] : TiExceptionHandler: (main) [1,135] - Message: Uncaught Error: near "(": syntax error: , while compiling: (id_contacto INTEGER PRIMARY KEY NOT NULLAUTOINCREMENTnombre VARCHAR(32)NOT NULL,apellido VARCHAR(64)NOT NULL,telefono VARCHAR(16))
    [ERROR] : TiExceptionHandler: (main) [6,141] - Source: db.execute(query);
    [ERROR] : V8Exception: Exception occurred at app.js:8: Uncaught Error: near "(": syntax error: , while compiling: (id_contacto INTEGER PRIMARY KEY NOT NULLAUTOINCREMENTnombre VARCHAR(32)NOT NULL,apellido VARCHAR(64)NOT NULL,telefono VARCHAR(16))

    — answered July 5th 2015 by Jesus Davila
    permalink
    1 Comment
    • HI,

      I am new in this framework and sdk both. So please guide me How will i install in a right way?

      — commented August 26th 2015 by sushil yadav
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.