tableView widget tossing

I am converting to Graphics 2.0 and running into the following with all my tableView objects

Seems like something that should not be possible in the widget code … the variable separatorRightPadding is not initialized … seems like no matter what i am doing that should not be possible. (see error below)

The error gets tossed when i insert a row into my TableView.

That code looks like:

self.tableView:insertRow{             rowHeight=100,             isCategory=false,             rowColor={ default={ 1, 1, 1 }, over={ 1, 0.5, 0, 0.2 } },             lineColor={0, 0, 0, 128}         }  

Anyone else seen this?  Using the latest daily 2183

ps … i do not have the variable ‘separatorRightPadding’ in my code anywhere.

?:0: attempt to perform arithmetic on field 'separatorRightPadding' (a nil value) message stack traceback: &nbsp;&nbsp;&nbsp;&nbsp;?: in function \<?:218\> &nbsp;&nbsp;&nbsp;&nbsp;[C]: ? &nbsp;&nbsp;&nbsp;&nbsp;?: in function '\_createRow' &nbsp;&nbsp;&nbsp;&nbsp;?: in function \<?:1116\> &nbsp;&nbsp;&nbsp;&nbsp;(tail call): ? &nbsp;&nbsp;&nbsp;&nbsp;/Users/marcslack/Library/Application Support/luaglider2/dev/ProjectBuilds/ArcherZUpshot(Builds)/ArcherZUpshot(ArcherZUpshot Build)/ArcherZUpshot/sceneListEvents.lua:440: in function 'renderEventList' &nbsp;&nbsp;&nbsp;&nbsp;/Users/marcslack/Library/Application Support/luaglider2/dev/ProjectBuilds/ArcherZUpshot(Builds)/ArcherZUpshot(ArcherZUpshot Build)/ArcherZUpshot/sceneListEvents.lua:464: in function 'willEnterScene' &nbsp;&nbsp;&nbsp;&nbsp;/Users/marcslack/Library/Application&nbsp; &nbsp;

What does your tableView constructor look like?

I rolled back to 2170 and the issue is not present … somewhere between 2170 and 2183 tableView became broken.

for what it is worth here is the constructor

self.tableView = widget.newTableView( { &nbsp; &nbsp; &nbsp; &nbsp; onRowTouch=function (event) self:onRowTouch(event) end, &nbsp; &nbsp; &nbsp; &nbsp; onRowRender=function (event) self:onRowRender(event) end, &nbsp; &nbsp; &nbsp; &nbsp; left=minVisibleX, &nbsp; &nbsp; &nbsp; &nbsp; top = yInsert, &nbsp; &nbsp; &nbsp; &nbsp; height = scrollerHeight, &nbsp; &nbsp; &nbsp; &nbsp; width&nbsp;&nbsp;&nbsp;&nbsp;= scrollerWidth, &nbsp; &nbsp; &nbsp; &nbsp; maskFile = fileName, &nbsp; &nbsp; &nbsp; &nbsp; baseDir = scrollerMaskDirectory, &nbsp; &nbsp; &nbsp; &nbsp; hideBackground=false, &nbsp; &nbsp; &nbsp; &nbsp; backgroundColor = {1, 1, 1, 0.8}, &nbsp; &nbsp; &nbsp; &nbsp; scrollBarColor= {0, 0, 0, 0.5}, &nbsp; &nbsp; &nbsp; &nbsp; bottomPadding = 150 &nbsp; &nbsp; } ) &nbsp;

Are you using a particular theme?  Do you by any chance have a theme file in your project instead of using our default themes?

Rob

Well here is my issue with your themes … last time i checked they did not respect the config file use of extensions for resolution.

I use a convention of -x40 and -x20 … i just did not like the @ symbol so went a different direction long ago. That was fine till widgets 2.0 came out and they do not respect the convention of the config file and assume that you are using the @ as the convention.

So the hack to get widgets working for me is:  … ps i really wish you guys would fix that … follow your design guidelines :slight_smile:

Anyway does this help?

package.preload.widget\_theme\_ios7 = nil package.preload.widget\_theme\_ios7\_sheet = nil package.preload.widget\_theme\_ios = nil package.preload.widget\_theme\_ios\_sheet = nil package.preload.widget\_theme\_android = nil package.preload.widget\_theme\_android\_sheet = nil -- --Fix because the widget theme does not respect my naming convention for resolutions -x20, etc -- local widget = require("widget") -- --Dont think that the ios7 theme is ready for prime time ... so override and use the old one. -- widget.setTheme("widget\_theme\_ios") &nbsp;

We are going to look at error proofing this.  In the mean time, you can add:

separatorLeftPadding = 0,
separatorRightPadding = 0,

to the widget.tableView table in your theme files to set the value.  It probably should be 0 for the separatorRightPadding on all current platforms by default.  The leftPadding is 15 on iOS 7, 0 on others.

Rob

What does your tableView constructor look like?

I rolled back to 2170 and the issue is not present … somewhere between 2170 and 2183 tableView became broken.

for what it is worth here is the constructor

self.tableView = widget.newTableView( { &nbsp; &nbsp; &nbsp; &nbsp; onRowTouch=function (event) self:onRowTouch(event) end, &nbsp; &nbsp; &nbsp; &nbsp; onRowRender=function (event) self:onRowRender(event) end, &nbsp; &nbsp; &nbsp; &nbsp; left=minVisibleX, &nbsp; &nbsp; &nbsp; &nbsp; top = yInsert, &nbsp; &nbsp; &nbsp; &nbsp; height = scrollerHeight, &nbsp; &nbsp; &nbsp; &nbsp; width&nbsp;&nbsp;&nbsp;&nbsp;= scrollerWidth, &nbsp; &nbsp; &nbsp; &nbsp; maskFile = fileName, &nbsp; &nbsp; &nbsp; &nbsp; baseDir = scrollerMaskDirectory, &nbsp; &nbsp; &nbsp; &nbsp; hideBackground=false, &nbsp; &nbsp; &nbsp; &nbsp; backgroundColor = {1, 1, 1, 0.8}, &nbsp; &nbsp; &nbsp; &nbsp; scrollBarColor= {0, 0, 0, 0.5}, &nbsp; &nbsp; &nbsp; &nbsp; bottomPadding = 150 &nbsp; &nbsp; } ) &nbsp;

Are you using a particular theme?  Do you by any chance have a theme file in your project instead of using our default themes?

Rob

Well here is my issue with your themes … last time i checked they did not respect the config file use of extensions for resolution.

I use a convention of -x40 and -x20 … i just did not like the @ symbol so went a different direction long ago. That was fine till widgets 2.0 came out and they do not respect the convention of the config file and assume that you are using the @ as the convention.

So the hack to get widgets working for me is:  … ps i really wish you guys would fix that … follow your design guidelines :slight_smile:

Anyway does this help?

package.preload.widget\_theme\_ios7 = nil package.preload.widget\_theme\_ios7\_sheet = nil package.preload.widget\_theme\_ios = nil package.preload.widget\_theme\_ios\_sheet = nil package.preload.widget\_theme\_android = nil package.preload.widget\_theme\_android\_sheet = nil -- --Fix because the widget theme does not respect my naming convention for resolutions -x20, etc -- local widget = require("widget") -- --Dont think that the ios7 theme is ready for prime time ... so override and use the old one. -- widget.setTheme("widget\_theme\_ios") &nbsp;

We are going to look at error proofing this.  In the mean time, you can add:

separatorLeftPadding = 0,
separatorRightPadding = 0,

to the widget.tableView table in your theme files to set the value.  It probably should be 0 for the separatorRightPadding on all current platforms by default.  The leftPadding is 15 on iOS 7, 0 on others.

Rob