I’m using the Table View (specifically, the List View 2 example code) and am trying to create a scrolling list that emails a person when there name is tapped. Can I do this? If so, can anyone help?
An excerpt of the code …
– Setup data
local data = {}
for i=1, 158 do
data[i] = {}
data[i].title = "List item "… i
local c = math.modf(i/5)
data[i].category = "Category "… c + 1
data[i].email = ???
end
–Setup functions to execute on touch of the list view items
function listButtonRelease( event )
self = event.target
system.openURL( “mailto:” … ??? )
end
With respect to the mailto tag, I’ve loaded the email address for each cell. How can I access that information when I call system.openURL?
– Setup data
local data = {}
for i=1, 158 do
data[i] = {}
data[i].title = "List item "… i
local c = math.modf(i/5)
data[i].category = "Category "… c + 1
end
–Setup functions to execute on touch of the list view items
function listButtonRelease( event )
self = event.target
system.openURL( “mailto:dhogan@jimned.esc14.net” ) end
Nice idea … I tried that earlier with no luck. I’ll try to work with the index for a while. Thanks! [import]uid: 36444 topic_id: 9128 reply_id: 33283[/import]
– Setup data
local data = {}
for i=1, 158 do
data[i] = {}
data[i].title = "List item "… i
local c = math.modf(i/5)
data[i].category = "Category "… c + 1
end
– Setup functions to execute on touch of the list view items
function listButtonRelease( event )
self = event.target
local id = self.id
system.openURL( “mailto:”… data[id].email )
end