Titanium Community Questions & Answer Archive

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

Custom Module Example?

[FIXED BY 1.1.2 PATCH] Sorry to ask this again, but this is extremely important. Does anyone have a simple example of a custom module for Titanium Mobile 1.0? The old example does not work, there's nothing in the Kitchen Sink for this, and there's no documentation for it.

A simple "Hello, world" example would be great.

— asked March 18th 2010 by Mark Burggraf
  • custom
  • extension
  • module
0 Comments

14 Answers

  • I'm working on porting a full blown example right now and hope to have this done in the next day or so. If you take a look at this page it's still a decent getting started. All of our internal modules in Git use the same SDK so you could also look at the source. The Android Module SDK isn't yet ready but will follow a very similar pattern - except it's java and Eclipse.

    — answered March 18th 2010 by Jeff Haynie
    permalink
    1 Comment
    • Your link does not work, could you provide us with an updated one? Thanks.

      — commented July 30th 2010 by Charlie Roche
  • Thanks Jeff. Excellent, fast response. This looks quite promising.

    Will we be able to create and maintain custom modules across iPhone, Android, OSX, Windows, and Linux platforms? We'll have some custom code that we'll need to access on all the platforms, and any best-practices for maintaining these custom modules across platforms would be very welcomed.

    If this can be accomplished without a huge hassle, it's a major selling point for Titanium.

    — answered March 18th 2010 by Mark Burggraf
    permalink
    0 Comments
  • We saw that, but unfortunately, we can't get it to work. We're missing something, but don't know what yet.

    — answered March 24th 2010 by Mark Burggraf
    permalink
    0 Comments
  • The new documentation is vague at best, real world examples, even as the poster suggested "Hello World" would be nice, your platform is noce, it's easy but that comes at a price of substance, without the ability to extend the platform and better documentation there is little hope this will be worth the millions invested into it.

    — answered March 24th 2010 by Christopher Reding
    permalink
    0 Comments
  • The new documentation is vague at best, real world examples, even as the poster suggested "Hello World" would be nice, your platform is noce, it's easy but that comes at a price of substance, without the ability to extend the platform and better documentation there is little hope this will be worth the millions invested into it.

    — answered March 24th 2010 by Christopher Reding
    permalink
    0 Comments
  • We have followed the new documentation exactly (even copied and pasted one method and used the example as shown.) It does not work, but gives:

    [ERROR] Script Error = Result of expression 'Titanium.MyFirst' [undefined] is not an object. at app.js (line 7).

    Has ANYONE been able to create a working custom module for 1.x?

    — answered March 25th 2010 by Mark Burggraf
    permalink
    0 Comments
  • Same issue here, even returning a simple string throws an error that the function undefined is not an object, no hello world…odd

    — answered March 25th 2010 by Christopher Reding
    permalink
    0 Comments
  • This has been fixed by a patch to 1.1.2. It was broken, but after installing the updated sdk (1.1.2+) (and reinstalling the development template) it works fine now.

    — answered March 25th 2010 by Mark Burggraf
    permalink
    0 Comments
  • Mark, where did you get the patch 1.1.2+ ? i'm still getting the error "result of expression 'Titanium.MyFirst' [undefined] is not an object. " with the 1.1.2 sdk. Thanks.

    — answered March 26th 2010 by Driss Drissi
    permalink
    0 Comments
  • The patch was sent to me by the Appcelerator staff. The fix will be in their next release, or you can email them and ask for the patch.

    — answered March 26th 2010 by Mark Burggraf
    permalink
    0 Comments
  • Does anybody have an estimate for when the release that fixes this will be?

    — answered March 28th 2010 by Brian Naughton
    permalink
    0 Comments
  • The patch can be found here:
    http://github.com/appcelerator/titanium_mobile/commit/33d25f063d2c8b6383470515609b8c2aa899b507

    Changed the mentioned file and voila, everything works … finally. Next step, finding out how Android modules might work.

    — answered March 29th 2010 by Sebastian Herp
    permalink
    0 Comments
  • I am very interested in this too… one example for iPhone and one for Android too would be great!

    — answered March 18th 2010 by Jonas Panten
    permalink
    0 Comments
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.