I have a spinner that is populated from a list. One of the elements is " Add a new element ". When selected, a textbox notifier pops up and allows the user to enter a new element. The problem is, if they press cancel, the word cancel appears in the list as a new element. Any help would be appreciated.
You need to set a conditional check (if/else) in your text entry notifier event.
if (upcase) entry = (upcase) cancel
then do nothing
else
add new element
Your code fails, as my original code also failed. Yours fails because 'Cancel' is all upper case on the Notifier.
Its Works For me!
That's what I thought - but, type something into the Notifier text box and then hit Cancel,,,,,,,
Neither of you handled the spinner selection issue (set a title to the first selection, so that all real selections can be made, repeatedly)
upcasing Cancel on both sides ensures variants of Cancel are handled (different devices with en language)
Not specified!
.... you have changed your code?
Your original code:
No, I'm Not changed it!!
The difference is, 'Cancel' and 'CANCEL' as TimAI2 said before - to cater for both versions, you must upper case the response and the comparator.
...but it's an ugly comparison when it could be elegant.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.