Having problems in appending a customItem to a newly created form. I have successfully done this within the rest of the code. No idea why this part should be any different.
I'm trying to implement a backward navigation. When I initally create the new customItem, I save it. So when I hit "Back" in a diff screen, I try to append that "saved" item onto a new form.
The following exception is thrown at the very last line. (newForm.append(...))
newForm = new Form("Resources", null);
Uncaught exception: java.lang.IllegalStateException
- javax.microedition.lcdui.Item.SetParent(), bci=22
- javax.microedition.lcdui.CustomItem.SetParent(), bci=2
- javax.microedition.lcdui.Form.Insert(), bci=63
- javax.microedition.lcdui.Form.append(), bci=15
- ui.ResourceView.run(), bci=1608
- java.lang.Thread.run(), bci=11
The above code is executed in a new thread (hence the run()). bkList is my customItem, that was saved from a previous screen. I have ascertained that it is not null, and contains the correct information.
Does anyone have any ideas?