Hello, I am a newby at Corona SDK.
I am creating an application which calculates numbers and I want to use the weel picker for the amount.
Is there any way to trigger an event when scrolling the wheel picker? (I have two values in the wheel picker)
Example:
-- Text field to display the amount choosen: local currentPicker = display.newText( "Bill Amount: 20.50", 0, 450, native.systemFont, 50 ) currentPicker.anchorX = 0 currentPicker.anchorY = 0 currentPicker.x = -50 currentPicker:setFillColor( 0 )
-- the wheel picker created: local pickerWheel = widget.newPickerWheel { top = 200, left = 50, columns = columnData, }
-- the function which calles the values from the wheel picker: local function showValues( event ) local values = pickerWheel:getValues() currentPicker.text = "Bill Amount: " .. values[1].value .. "." .. values[2].value return true end
The question is, can I put something in the wheel picker to return the value as soon as I pick them?
local pickerWheel = widget.newPickerWheel { top = 200, left = 50, columns = columnData, listener = showValues, onRealease = showValues, onClose = showValues, }
Is there any command to call the values when they are picked or do I need a timer excecution for this?
– Get the table of current values for all columns
– This can be performed on a button tap, timer execution, or other event
local values = pickerWheel:getValues()
What other events can trigger the values to be displayed?
Thank you.
Huni.