widget.newTableView() malfunctioning on Windows iPad simulator.

(Assuming the display is an iPad, in Portrait view)

  1. Build a table with 50 entries and 10 category entries. No particular order is needed but to do something “expected”, give each category some entries.
  2. Each entry needs to obey the rules required by the widget (I’ve documented those in the widget comments)
  3. mybrowser = widget.newTableView{}
  4. mybrowser:sync(yourtable)

Results :

  1. It seems to scroll fine moving down the list, but begins to flicker quite badly around the top of the ipad.
  2. When you get to the bottom and scroll back up, entries start to go missing. Since you can’t scroll if your finger/mouse is not over an entry it eventually renders the program un-usuable.
  3. The problem is consistent - happens on all views, not just iPad.

Sample Code:

local mytable = {} mytable[01] = { categoryName="Category 1" } mytable[02] = { title={label="Title"}, subtitle={subtitle="subtitle"} } mybrowser = widget.newTableView{} mybrowser:sync(mytable)

(Just copy/paste table entries and replace the [0X] with valid numbers with no breaks - it needs to be a contiguous 1-60 to the size I tested with.)

System:
-Corona SDK 2011.591 (2011.8.2)
-Windows 7-64, GTX285 [import]uid: 41884 topic_id: 13934 reply_id: 313934[/import]

does your tableview conform to the sizes allowed in the API reference? [import]uid: 24641 topic_id: 13934 reply_id: 51327[/import]

a. Yes
b. As you can see in the code above I’m passing no special heights so: yes
c. As I said above I noticed this first on iPad Portrait mode (1024h) so yes :slight_smile:

Since it’s reproduce-able with just the code above I haven’t even tried using my own data. (When I did, I noticed that it wasn’t necessarily showing items in order of table entry…but I have to check that tonight to see if it’s another bug to file.) [import]uid: 41884 topic_id: 13934 reply_id: 51334[/import]

Well I’ve gone ahead and filed a bug, but if anyone here could test and tell me whether they have the same problem, that would be great. All you need is the widget resource files - then just run this main.lua from the appropriate directory.

I’m particularly interested in whether things run okay on a Mac or not.

[code]local widget = require(“widget”)

local data={} – a table, for the purposes of showing this bug
data[01] = { categoryName=“Tier 1” }
data[02] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#1", size=18, left=194, top=-20} }
data[03] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#2", size=18, left=194, top=-20} }
data[04] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#3", size=18, left=194, top=-20} }
data[05] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#4", size=18, left=194, top=-20} }
data[06] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#5", size=18, left=194, top=-20} }
data[07] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#6", size=18, left=194, top=-20} }
data[08] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#7", size=18, left=194, top=-20} }
data[09] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#8", size=18, left=194, top=-20} }
data[10] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#9", size=18, left=194, top=-20} }
data[11] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#10", size=18, left=194, top=-20} }
data[12] = { categoryName=“Tier 2” }
data[13] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#10", size=18, left=194, top=-20} }
data[14] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#11", size=18, left=194, top=-20} }
data[15] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#12", size=18, left=194, top=-20} }
data[16] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#13", size=18, left=194, top=-20} }
data[17] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#14", size=18, left=194, top=-20} }
data[18] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#15", size=18, left=194, top=-20} }
data[19] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#16", size=18, left=194, top=-20} }
data[20] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#17", size=18, left=194, top=-20} }
data[21] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#18", size=18, left=194, top=-20} }
data[22] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#19", size=18, left=194, top=-20} }
data[23] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#20", size=18, left=194, top=-20} }
data[24] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#21", size=18, left=194, top=-20} }
data[25] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#22", size=18, left=194, top=-20} }
data[26] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#23", size=18, left=194, top=-20} }
data[27] = { categoryName=“Tier 3” }
data[28] = { categoryName=“Tier 4” }
data[29] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#24", size=18, left=194, top=-20} }
data[30] = { categoryName=“Tier 5” }
data[31] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#25", size=18, left=194, top=-20} }
data[32] = { categoryName=“Tier 6” }
data[33] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#26", size=18, left=194, top=-20} }
data[34] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#27", size=18, left=194, top=-20} }
data[35] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#28", size=18, left=194, top=-20} }
data[36] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#29", size=18, left=194, top=-20} }
data[37] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#30", size=18, left=194, top=-20} }
data[38] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#31", size=18, left=194, top=-20} }
data[39] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#32", size=18, left=194, top=-20} }
data[40] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#33", size=18, left=194, top=-20} }
data[41] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#34", size=18, left=194, top=-20} }
data[42] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#35", size=18, left=194, top=-20} }
data[43] = { categoryName=“Tier 7” }
data[44] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#36", size=18, left=194, top=-20} }
data[45] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#37", size=18, left=194, top=-20} }
data[46] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#38", size=18, left=194, top=-20} }
data[47] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#39", size=18, left=194, top=-20} }
data[48] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#40", size=18, left=194, top=-20} }
data[49] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#41", size=18, left=194, top=-20} }
data[50] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#42", size=18, left=194, top=-20} }
data[51] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#43", size=18, left=194, top=-20} }
data[52] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#44", size=18, left=194, top=-20} }
data[53] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#45", size=18, left=194, top=-20} }
data[54] = { categoryName=“Tier 8” }
data[55] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#46", size=18, left=194, top=-20} }
data[56] = { categoryName=“Tier 9” }
data[57] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#47", size=18, left=194, top=-20} }
data[58] = { categoryName=“Tier 10” }
data[59] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#48", size=18, left=194, top=-20} }
data[60] = { title={ label=“Some Guy”, size=18 }, subtitle={ label="#49", size=18, left=194, top=-20} }

itembrowser = widget.newTableView{ }
itembrowser:sync(data)[/code] [import]uid: 41884 topic_id: 13934 reply_id: 51484[/import]

the posted code didn’t work for me on Mac, but I don’t use the widgets so I’m not sure if it is truly a bug or something in the code. I tried the code on this page:

http://developer.anscamobile.com/reference/index/widgetnewtableview

found a few errors (missing commas, adding a ‘require’ statement at the top), fixed them, but still got an error. Again, I don’t use widgets so it could be that there is something in the code I’m missing. But at least the code on the API page should work as posted. [import]uid: 7947 topic_id: 13934 reply_id: 53301[/import]

Thanks for looking, hdez.

(Reading comp failed on my part…) Yeah, if you check the comments on the widget page I submitted an extensive list of fixes.

But what I was hoping you could try was:

a. Copy the widget resource folder to this temp project folder (widgets don’t work without their resource files.)

b. Try that huge code chunk I posted on the 3rd reply. I’m literally just interested in if it runs, and it any entries disappear when you scroll really fast (provided that it runs…)

On my windows build I get a stack error after everything is cleaned up, and that’s ignoring the disappearing issue. Was hoping it might be a PC only issue. [import]uid: 41884 topic_id: 13934 reply_id: 53309[/import]

Ahh, ok. I thought they had folded all that stuff into the build already.

So I copied your code to a new main.lua file in the WidgetsDemo folder, ran it, and sure enough it ran the way you said it would. Get to about Tier 4 and the thing starts flickering. Try to scroll upwards and rows start disappearing. [import]uid: 7947 topic_id: 13934 reply_id: 53358[/import]

Confirmed. Goes horribly wrong here…

This needs fixing big time, I’m about to submit to the app store to meet a deadline and my app is relying heavily on the tableview widget…

[import]uid: 50154 topic_id: 13934 reply_id: 53359[/import]

No response from anybody at Ansca? Seriously?

The issue seems to be related to using categories. If i’d known this I’d not have bothered using widgets…

Seems to me that the widgets are a half assed attempt at best (even the documentation for them is wrong, and nobody can be bothered to fix that)

I keep rebuilding my project because of limitations within Corona which keep getting ‘fixed’, only to discover that having rebuilt, I once again have to start again because some other problem caused by the fix. Seems like a never ending cycle and it’s beginning to get to me.

I don’t get why coronaui (opensource) was dropped for widgets with less functionality (which we cannot edit, or fix the many bugs, and they don’t work on android) so looks like I’m digging out coronaui again, and undoing a couple of months of work.

Rant over. [import]uid: 50154 topic_id: 13934 reply_id: 53794[/import]

For what it’s worth:

  1. I did report my OP as a bug. Last time I checked it was hanging around in the to-be-assigned area, but it’s there.

  2. I am a little bit surprised the documentation updates slowed down; I did write a pretty detailed doc fix list in the comments for this particular API page.

  3. In their defense, they are clearly (you can tell from the roadmap and bug page) working on some big-picture features right now rather than mopping every bug in sight, so I feel somewhat assured that they’ll get to this when they can.

That being said, I think the widgets should really just be considered rough shortcuts or visualizers at this point, since they are really just closed functions that lack some of the obvious polish of native xcode. (For example, when you scroll to a new category, in listView it “bumps” the old category out, while in the widget, it simply changes the number.)

I’m currently working on recoding my own version of listView to replicate the things the widget DOES do well - namely, custom heights and sync (lord knows how I’ll do that) but since I don’t have much experience I don’t have a deadline. All I can suggest is to use listView (or XL, I suppose), and build out what you need from there… [import]uid: 41884 topic_id: 13934 reply_id: 53810[/import]

I’m new to Corona , using the widgets (I understand they are “beta”) and also running into some issues such as this flicker issue. Sound like I should not use widgets ? [import]uid: 79594 topic_id: 13934 reply_id: 56281[/import]

I think some of the widgets are fine to use, if quirky. newButton, Picker, etc. But I really can’t recommend using newTableView right now - the problems are just too severe unless you’re using a a very small amount of data.

The core “problem” with widgets is essentially that they are non-fixable shortcuts that are missing some of the presentation of the actual iOS interface. So if you want to fix any of that, you need to build your own function and drop the widget entirely.

For now I strongly suggest moving over to listView.lua or listViewXL.lua (see the templates section or the shared code section). They lack some features and need some hacking to do what you want to do, but they are rock solid for large amounts of data and you can immediately jump in and add that extra stuff you need. I’ve already made my own version that adds a few other bits of display data and lets you do custom sorting.

[import]uid: 41884 topic_id: 13934 reply_id: 56289[/import]