Quotewhat code exactly needs be included into the DfM source ?
Pretty much all of the MainForm code that I posted seems to be needed:
The sleep subroutine to implement a forced delay between adding the items: It appears that it is a time sensitive problem.
The call of this when new items are added: Having this delay stops the (I suppose) failure of the SE properly registering the message calls (like 'paint') on the form's queue.
The forcing of background (threaded) execution of the dictionary search: Without this, the SE tries to update the form as items are added, but in a very broken way; a bit like a severe windows slowdown.
Moving the redisplay translation results call so that this is not done on the SE when the settings form is closed: Without this, the user can interact with the settings form while refreshAllTranslationResults(); is executing and since the added delay between item adding is in place, the process is much slowed too (depending on the number of results).
The sizeChanged() additions to the two CustomItem types classes are not essential, but probably also needed on a more general level just to make sure that when the display width is changed, the formatting is re-calculated so that eg: the VM adding a scrollbar does not cause the ends of lines to get hidden by the scrollbar.
Quotewell tested codePut it this way, it works on my k800i 90-99%. I doubt there is a 100% fix because it is a problem with the VM on the phone. Without it, the custom items work about 0-2% of the time.
I have done all of the testing I have had the time and patience for; this was only with the one dictionary:- The English -> Chinese one and mostly with the test Midlet, which eventually ended up as the one I posted, though I think the method used in that of 'activating' the 'full functionality' of the CustomItems after they are added is not important to DFM: The 'sleep' works, and I think there would be too much to change (and too much potential for breaking things) to do this in DFM.
Quotewhich does work on all devicesI can't know this because I only have a K800i to test on, so:
I have no idea if newer SE models have this bug.
I have no idea if older ones have it.
The problem appears to be time sensitive: Things break when an item is added when the previous one is still being processed by what appears to be a VM thread, so the delay may not be sufficient on older (read: maybe slower) SE phones if they have the same problem.
I can only appeal for any people who have other SE models who read this forum to try the fix on them!