On Sun, Feb 15, 2009 at 2:28 PM, automerc <bigautosur...@gmail.com> wrote:

>
> I'm not sure how to use this exactly. I'm running the application on
> eclipse and there doesn't to be any command to the log, and when I try
> to run the command on a shell it doesn't work. I figure out that the
> error is caused when I try to initialize the variable forms.


You really should learn to use logcat. You will be much more productive that
way.
The problem you are having is because this:

               choices = new ArrayList<String>(10);
               for (int i = 0; i <10; i++){
                       choices.set(i, null);
               }

does not do what you think it does. The first line creates an *empty*
ArrayList, with a capacity for 10 items.
Then you try to set the first 10 items of the list, however the list is
empty, and so your index is out of range. If you look at the system log, you
will see the app throwing an IndexOutOfBounds exception.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to