06-20-2011 04:35 PM
Recently too much question about Torch 9800 device,
I create a screen with a couple of FieldManager.
let me say:
One is Top, one is Middle. and one is at bottom.
Top and bottom are not scrollable, just middle one is scrollable,
Middle one holds two fields, the top one is FieldManger, the next one is ListField, once user click one Item of ListField, this field will add to the top one.and then refresh ListField to show indicate added one with different color.
the issue is, once the item is added to the top, it will call sublayout to re-layout screen, everything works fine on simulator and device not Torch device. once I loaded to Torch device, it will loop sublayout, if I scroll the FieldManager to hide it, then loop will stop.
is there any person kind offer me some hint? how to trace that? I have worked whole day, and no clue right now.
Thanks in advance.
Solved! Go to Solution.
06-20-2011 06:34 PM
When you say it will loop, is this a recursive call, where sublayout does some processing which itself calls sublayout and so on. Or does it just keep getting called?
I suspect it just keeps getting called. In which case you will have to d through all the processing you do and look for something that might make a Field think it needs to lay itself out again. it sounds like in the middle of layout you are doing something, like a font of Field change, that causes the processing to schedule another layout.
06-21-2011 09:09 AM
The strange thing is it works on simulator,
You are right, simualtor is different from device.
I look at my source code again, i have done some when do sublayout on one of fieldmanager.
since every time when a field is added to manager, manager will call sublayout, the strange thing is that after
manager invoke sublayout, it will reset itself verticalscroll go to top,
so i first call getverticalscroll to keep current position after layout, i reset it, why I do something like this.
if i do it outside, it will scroll to top, and then scroll to my position, so it is wired to user.
Is there any idea? this is only happen on OS 6.0?