Titanium Community Questions & Answer Archive

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

My code is out to get me!

This is going to be stupid, i just know it, But i've been staring at this for ages.
GIST of it

The code above crashes at line 4,16,25
Yet works just fine on the 4th menu option, First 3 Menu choices are crashing

[TRACE] E/KrollCallback( 648): (kroll$1) [18,14073] Error evaluating source: Wrapped java.lang.NullPointerException (file:///android_asset/Resources/Menu.js#25)

I'm sure someone will just look at it and laugh, but I just can't see it today.

Regards,
Ryan

— asked September 7th 2010 by Ryan Tregea
  • android
  • javascript
  • question
0 Comments

2 Answers

  • maybe add a event to your listeners

    addEventListener('click', function(){
    to
    addEventListener('click', function(e){
    

    and where is the var c ??

    c.open('GET', 'Some URL');
    c.send({Login:Titanium.App.Properties.getString('Login'),DeviceID:Ti.Platform.id,Model:Ti.Platform.model});
    
    — answered September 7th 2010 by Carl Jahn
    permalink
    0 Comments
  • I forgot to mention that this Code was working previously, We added some new features, Didn't touch the menu, and now it's broke.

    The First Suggestion didn't work, Thanks for trying, The c variable is a XHR object i use to update the content of the app.

    — answered September 7th 2010 by Ryan Tregea
    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.