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:

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

does your tableview conform to the sizes allowed in the API reference?

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 :)

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.)

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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)

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.

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.

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.

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...

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.

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...

views:1743 update:2011/10/11 15:24:38
corona forums © 2003-2011