Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Inserting elements recursively to List fails in Series 40 6th Edition (Known Issue)
Inserting elements recursively (for example by using a for loop) to List by using the method insert(int elementNum, String stringPart, Image imagePart) fails as follows:
- when the number of elements is less than 12, only one element will be shown on the List;
- when the number of elements is 12 or more, the List hangs.
How to reproduce
This issue can be reproduced by using this test MIDlet: File:PopulateList.zip
The MIDlet tests a use case where the number of elements is 12.
After launching the MIDlet, press Populate.
On the affected devices, the MIDlet hangs.
The method insert(int elementNum, String stringPart, Image imagePart) should not be used to populate a List recursively. If a List needs to be recursively populated with elements, using the method append(String stringPart, Image imagePart) is recommended instead for the purpose.