Richard,
It seems there is NO “touch” even support for PickWheel,
I tried to put: Runtime:addEventListener(“touch”,listenforPicker),
When I click on PickWheel, there is no print out message from listenforPicker, if I click on other part of the screen out side the pickwheel, I got print out info “Picked”.
When I put:
picker:addEventListener(“touch”,listenforPicker)
There is no Print out info when I click on PickWheel or on other part of Screen.
Maybe I am doing something wrong,(I am testing this in Simulator), I am using Corona Demo example.
Thank you so much.
==========================
local function pickerinit()
local columnData = {}
columnData[1] = { “January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December” }
columnData[1].alignment = “right”
columnData[1].width = 150
columnData[1].startIndex = monthIndex
columnData[2] = {}
for i=1,31 do
columnData[2][i] = i
end
columnData[2].alignment = “center”
columnData[2].width = 60
columnData[2].startIndex = dayIndex
columnData[3] = {}
for i=1,25 do
columnData[3][i] = i+1990
end
columnData[3].startIndex = yearIndex
– create pickerWheel widget
picker = widget.newPickerWheel{
id=“pickerWheel”,
top=480, --258,
font=native.systemFontBold,
columns=columnData,
}
local listenforPicker = function(event)
print(“Picked”)
if event.target == picker then
print(“Picked”)
end
end
–picker:addEventListener(“touch”,listenforPicker)
Runtime:addEventListener(“touch”,listenforPicker)
– slide the picker-wheel up
transition.to( picker, { time=250, y=258, transition=easing.outQuad } )
–transition.to( picker, { time=250, y=258, transition=easing.outQuad,onComplete=listenforPicker } )
–transition.to( picker, { time=1500, alpha=0, x=(w-50), y=(h-50), onComplete=listenforPicker } )
end [import]uid: 83418 topic_id: 18639 reply_id: 71687[/import]