[codenameone-discussions] Re: Picker: how to determine if user picked a value or canceled

2018-05-26 Thread Shai Almog
The only workaround I have for that right now is the old workaround of using the native picker API directly, since that API is synchronous you know when it ended. When we have a more stable lightweight implementation it will make sense exposing it this way. -- You received this message

[codenameone-discussions] Re: Picker: how to determine if user picked a value or canceled

2018-05-26 Thread Thomas
Yes but how can I determine exactly when it is canceled (as I need to perform some action immediatly after this cancel event)? After the picker was opened, the user can take 1, 2, 3, 4s... 1min... to actually cancel or confirm it. And, without any cancel event fired, I have no way to

[codenameone-discussions] Re: Picker: how to determine if user picked a value or canceled

2018-05-25 Thread Shai Almog
If the picker was opened and no action event was sent then it was probably canceled. No? Up until recently the workaround for this was to launch the native picker directly from the display class. But we are transitioning to the lightweight picker so that might not be the best approach. --

[codenameone-discussions] Re: Picker: how to determine if user picked a value or canceled

2018-05-25 Thread Thomas
The problem is that the action listener is not triggered on cancellation events. So I have no way to determine that the user finished to act with the picker if he cancelled its action... On Friday, May 25, 2018 at 7:21:19 AM UTC+2, Shai Almog wrote: > > We don't have consistent behavior for

[codenameone-discussions] Re: Picker: how to determine if user picked a value or canceled

2018-05-24 Thread Shai Almog
We don't have consistent behavior for cancellation at the time because of all the platform differences. The value should remain as it was before if the user canceled so the official way to work is to use the action listener and ignore cancellation events. We might provide more nuanced