I have a very strange problem that I can reliably reproduce, but I have been unable to find the cause.
I have an app with 5 tabs, and tabs 2 and 3 are tableviews. The tableview rows have the usual onEvent and onRender listeners, and the whole table also has a listener to check if event.type == “endedScroll” so that I can detect if the user has released after pulling the table down (i.e. it uses pull down to refresh).
These all work fine. However if I pull either one of the tableviews down slightly, and then change to any other tab before it has finished “springing back” to it’s default position, the app freezes and I get a stack traceback error.
The error doesn’t give me the lua.file and line it occurs on, but says that it happens in function ‘update_scrollbar’. I don’t have any function with that name so presumably it is a function built into Corona?
I’m not sure what to do about it, I tried removing my table listener but it still happens. I also tried removing my enterframe listeners in those classes in case the problem lay there, but it still persists.
It usually says “attempt to perform arithmetic on field ‘y’ (a nil value)” but occasionally it says “attempt to perform index field ‘target’ (a nil value)”
Has anyone else encountered the same problem?
I should add that multitouch is switched off in this app, but it is still common that this error occurs when changing tabs. [import]uid: 84115 topic_id: 33215 reply_id: 333215[/import]