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.