TableViewXL passing data through to release function

Hi All,

I have a dilemma similar to this other thread, but specifically with regards to the tableViewXL by Gilbert: http://developer.anscamobile.com/forum/2010/08/05/how-pass-additional-arguments-parameters-event-listener

Basically I have my data that gets passed through to create the list. When you select an item in the list it transitions through to another page to show more content, works great. I target the relevent information row content using the same method in the examples posted by Ansca by getting the row id through event.target.id:

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
--create single page view using the tableview row id in listButtonRelease
local function showDetails(detailID)
        singleScreenText = display.newText(data[detailID].subtitle), 0, 0, "ClarendonBT-Bold", 13)
end
 
--click function when selecting the row get the row id
local function listButtonRelease(event)
        --self = event.target
        local detailID = event.target.id
        showDetails(detailID)
end
 
--list
myList = tableView.newList{
                data=data, 
                default="list-item.png",
                over="list-item-over.png",
                onRelease=listButtonRelease,
                top=49,
                bottom=49,
                rowSize=44,
                --backgroundColor={ 128, 128, 128 },
                callback = function( row )
                
                        local g = display.newGroup()
                        print(row.title)
                        
                        local glossaryName = display.newText( row.title, 0, 0, system.nativeFont, 14 )
                        glossaryName:setTextColor(255,255,255)
                        g:insert(glossaryName)
                        glossaryName:setReferencePoint(display.CenterLeftReferencePoint);
                        glossaryName.x = 20
                        glossaryName.y = 22
                        
                        return g,glossaryName
                end
        }

Can anyone help me to pass parameters through the onrelease option and callback function of the tableViewXL? Gilbert maybe?

views:1471 update:2011/9/26 8:07:09
corona forums © 2003-2011