what's wrong with concatenation in blackberry application?

Posted by sexitrainer on Stack Overflow See other posts from Stack Overflow or by sexitrainer
Published on 2010-01-15T20:59:09Z Indexed on 2010/04/01 7:03 UTC
Read the original article Hit count: 239

For the life of me, I can't understand why adding a concatenated string to the MainScreen is causing the BB simulator to throw an exception. If I run a VERY simple hello program with the following control, all is well:

RichTextField rtfHello = new RichTextField("Hello There !!!");        
add(rtfItemDescription);

But if I add a concatenated string, the entire app breaks:

String MyName = "John Doe";
RichTextField rtfHello = new RichTextField("Hello There !!!" + MyName);        
add(rtfItemDescription);

So what am I doing wrong? Why would the simulator throw an exception for the second example?

© Stack Overflow or respective owner

Related posts about blackberry-simulator

Related posts about blackberry