NewPickerWheel problem with the new build 2015.2721

Hello , 

i was using corona in a old version , and my pickerWheel was working fine, today i update my corona to version 2015.2721  for windows, i don`t tested yet in the iphone , but  in windows simulator the widget.newPickerWheel    ignores my “tap” event listener to get the value clicked 

my code is the following 

pickerWheel:addEventListener(‘tap’,wheelPicked) 

Edited code because i wrote it wrong hahaha 

and the method wheelPicked never is called.

something changed in this new version of corona simulator ? 

Thanks for help 

Is this a typo?

[lua]

pickerWheel.addEventListener(‘tap’, wheelPicked)

[/lua]

As it should be like this (colon, not period)

[lua]

pickerWheel:addEventListener(‘tap’, wheelPicked)

[/lua]

I Edited my code, cause i wrote it wrong here , thanks for showing but in the corona code its fine the code , it dont gave any compilation error but don`t call my method 

i tried the code in an Android device, and didn`t work more , in my old version of corona it was fine, this is a bug with this new build ? can someone try it in a Iphone please ? 

Why are you adding a tap listener to the pickerWheel? This will at a minimum likely interfere with the underlying touch/tap code being used by the pickerWheel.

Rob

Hi Rob , the idea  is the user select the value in the wheel , and choose the value with the “tap” , and in tap event i get the value and dismiss the wheel 

There`s a better way to do this ? 

Thnaks for help 

Hi @hitokiriguich,

The problem with that design concept is that tapping on the wheel will select the value where the user tapped. So how do you know if the user wants to tap a value or dismiss the wheel?

The possible “exception” is that you detect if the user wants to dismiss the wheel ONLY if they tap in the central region (where the “selected” values are). In this case, you should put an invisible tap-sensitive rectangle on top of the wheel, covering the entire central region, and if the user taps on that, you dismiss the wheel.

Brent

I would recommend you look at the Clock app on an iPhone. You will see there are no methods of tapping on things to commit the changes. Instead, tapping on values centers them. Then there is a “Done” and “Cancel” button. The “Done” button commits the values selected. This is the standard design pattern around pickerWheels.

Rob

Is this a typo?

[lua]

pickerWheel.addEventListener(‘tap’, wheelPicked)

[/lua]

As it should be like this (colon, not period)

[lua]

pickerWheel:addEventListener(‘tap’, wheelPicked)

[/lua]

I Edited my code, cause i wrote it wrong here , thanks for showing but in the corona code its fine the code , it dont gave any compilation error but don`t call my method 

i tried the code in an Android device, and didn`t work more , in my old version of corona it was fine, this is a bug with this new build ? can someone try it in a Iphone please ? 

Why are you adding a tap listener to the pickerWheel? This will at a minimum likely interfere with the underlying touch/tap code being used by the pickerWheel.

Rob

Hi Rob , the idea  is the user select the value in the wheel , and choose the value with the “tap” , and in tap event i get the value and dismiss the wheel 

There`s a better way to do this ? 

Thnaks for help 

Hi @hitokiriguich,

The problem with that design concept is that tapping on the wheel will select the value where the user tapped. So how do you know if the user wants to tap a value or dismiss the wheel?

The possible “exception” is that you detect if the user wants to dismiss the wheel ONLY if they tap in the central region (where the “selected” values are). In this case, you should put an invisible tap-sensitive rectangle on top of the wheel, covering the entire central region, and if the user taps on that, you dismiss the wheel.

Brent

I would recommend you look at the Clock app on an iPhone. You will see there are no methods of tapping on things to commit the changes. Instead, tapping on values centers them. Then there is a “Done” and “Cancel” button. The “Done” button commits the values selected. This is the standard design pattern around pickerWheels.

Rob