So, yes I am using the newPickerWheel. Here is my widget code. I haven’t done a lot to yet but this is the logistics.
[code]
local widget = require “widget”
widget.setTheme (“theme_ios”)
– create table to hold all column data
local columnData = {}
– create first column
columnData[1] = { “January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December” }
–columnData[1] = { “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “11”, “12” }
columnData[1].alignment = “right”
columnData[1].width = 120
columnData[1].startIndex = 1
– second column (lots of rows)
columnData[2] = {}
columnData[2].alignment = “center”
for i=1,31 do
columnData[2][i] = i
end
columnData[2].startIndex = 1
– third column
columnData[3] = {}
for i=1,25 do
columnData[3][i] = i+2011
end
columnData[3].startIndex = yearIndex
local picker = widget.newPickerWheel{
id=“myPicker”,
font=“Helvetica-Bold”,
top=50,
columns=columnData
}
local widget = require “widget”
widget.setTheme (“theme_ios”)
– create table to hold all column data
local columnData = {}
– create first column
columnData[1] = { “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “11”, “12” }
columnData[1].alignment = “right”
columnData[1].width = 120
columnData[1].startIndex = 1
– second column (lots of rows)"
columnData[2] = { “00”,“01”,“02”,“03”,“04”,“05”,“06”,“07”,“08”,“09”,“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” }
columnData[2].alignment = “center”
for i= 1,59 do
– columnData[2][i] = i
end
columnData[2].startIndex = 1
– third column
columnData[3] = { “AM”, “PM” }
columnData[3].startIndex = 1
– create the actual picker widget with column data
local picker = widget.newPickerWheel{
id=“myPicker”,
font=“Helvetica-Bold”,
top=200,
columns=columnData
}
local label = display.newText(“Tap here to schedule a text”, 0, 0, font, 18) ;
label:setReferencePoint(display.BottomCenterReferencePoint);
label:setTextColor(255, 255, 255) ;
label.x = display.contentWidth * 0.5;
label.y = display.contentHeight * .94;
–group:insert( background )
function label:tap(e)
native.showAlert(“Message”,“Scheduled to be sent!”,{“Ok”})
native.showPopup(“sms”,{
}) ;
end
label:addEventListener(“tap”, label);
system.vibrate()
–end
function time_to_notify(hora_in, minutos_in)
local utcTime = os.date( “!*t”, os.time() )
local timeTable = os.date("*t")
local hora_cl = timeTable.hour
local minuto_cl = timeTable.min
segundos_cl = (hora_cl*60*60)+(minuto_cl*60)
segundos_in = (hora_in*60*60)+(minutos_in*60)
if(segundos_cl>segundos_in)then
seg_reg = 86400 - segundos_cl + segundos_in
end
if(segundos_cl<segundos_in> seg_reg = segundos_in-segundos_cl
end
back = os.date( “!*t”, os.time() + seg_reg )
return back
end
[/code]
[import]uid: 69302 topic_id: 31252 reply_id: 125684[/import] </segundos_in>