I’m new to corona development.
In my application I have two places for application windows on screen (left half and right half of letterbox screen). I have several windows (lets say 4), each has a TableView with a dynamic amount of rows.
By clicking buttons on toolbar I’m picking what windows are visible now.
The problem is - I do not understand correct data structures, to implement this in Corona.
In native Windows environment, I would create several fixed size borderless windows, add some list structure inside, and will just use window:hide, window:show according to buttons pressed on toolbar. All lists will process add/remove entries and forced scrolling without any problem being visible or hidden.
Question 1: how to implement same on Corona. Without destroying and reconstructing lists every time?
I tried to follow Sample Code\Interface\WidgetDemo sample.
I used tab1, tab2, etc, modules from that example to create windows. As I understand those tabs are different scenes. But when I try to visualize or change something on hidden tab application fails with an error. I tried to use scene overplay, to show 2nd window, since without overlay windows prefers to stay alone on a screen.
But problem with crashes, when attempting to change something on invisible window stays.
Then I took newPanel.lua from Corona web site. I’do not remember exact web link. That widget shows new window above existing scene. It works better, while off screen (no crashes and content do not vanish), but I have serious problems with visual content positioning inside this widget. On different android devices widgets tend to visualize up to 50% off right screen.
Question 2: Idea that anchor point of visual object is attached not to it’s upper left corner, but to center really piss me off. WHY??? Is it possible to change this behavior to “normal” windows behavior for all elements at once? Because writing .anchorX = 0, .anchorY = 0 every time is too annoying.