Page 1 of 2
Need a different MobilePick than the generic LC picker. - Solved
Posted: Sat Mar 06, 2021 5:00 pm
by DR White
The generic LC picker does not allow me to include enough text for the user to make the proper choice.
I need a picker that would support the following text:
'Run' side of Run/Off/Auto selector switch has bad connection
What are the possible options?
Thanks,
David
Re: Need a different picker than the generic LC picker.
Posted: Sat Mar 06, 2021 5:18 pm
by richmond62
Not quite sure what you are writing about, but suspect your 'problem' may
lie with using slash symbols:
-
-
Note that your line gets cut off at the first '/' while mine
Camels are bad-tempered beasts that have been know to bite people's finger off
does not.
Re: Need a different picker than the generic LC picker.
Posted: Sat Mar 06, 2021 5:24 pm
by dunbarx
Hi.
I am with Richmond here. What is a "picker"?
He may be on to something by pointing out the slashes in your string. Is that string used to build a pathname to some external file, perhaps with an "ask file" command?
Craig
Re: Need a different picker than the generic LC picker.
Posted: Sat Mar 06, 2021 5:25 pm
by DR White
I should have given more info on the "picker".
I am talking about using:
mobilePick optionList1, initialIndex1 [, optionList2, initialIndex2 ...] [, style ] [, button] [, view]
It does not support multiple lines or smaller text so that the long text of:
'Run' side of Run/Off/Auto selector switch has bad connection
can be selected as a pick on the mobilePick.
Re: Need a different MobilPick than the generic LC picker.
Posted: Sat Mar 06, 2021 5:28 pm
by richmond62
Aha.
That is rather different from what I thought you meant.
My mistake was zooming in on "generic LC picker".
Re: Need a different MobilePick than the generic LC picker.
Posted: Sat Mar 06, 2021 6:17 pm
by FourthWorld
Dr White, your description was fine. You explicitly noted "MobilePick" in the subject line, quite sufficient to convey context.
IIRC the picker LC provides with MobilePick is derived from the OS. Either way, the amount of text you want to display there is uncommonly long for a mobile picker. In such an ephemeral context it's a lot to ask the user to take in.
Are all the options in your picker that long?
Might there be another, more on-screen way to allow the user to selection that option, such as a custom form of radio control made from groups?
Re: Need a different MobilePick than the generic LC picker.
Posted: Sat Mar 06, 2021 6:28 pm
by DR White
Yes, I know the given text for the mobilePick is unusually long and really goes beyond what a mobilePick was intended for.
It is for an educational app that I am working on to teach electrical troubleshooting skills. After the user analyzes the circuit, the user
will choose one of the items from the list below:
Overload Tripped
CB 2 Tripped
E Stop Open
FWD Coil Open
REV Coil Open
'Run' side of Run/Off/Auto selector switch has bad connection
'Auto' side of Run/Off/Auto selector switch has bad connection
PLC Output O:01/00 is Bad (open)
PLC Output O:01/00 is Bad (shorted)
PLC Output O:01/01 is Bad (open)
PLC Output O:01/01 is Bad (shorted)
FWD AUX 1 Bad Connection
FWD AUX 2 Bad Connection
REV AUX 1 Bad Connection
REV AUX 2 Bad Connection
-- I Give Up. Please give me the answer. --
I like the behavior of the MobilePick. Radio button seem so outdated for a phone app.
What are some other options?
Re: Need a different MobilePick than the generic LC picker.
Posted: Sat Mar 06, 2021 6:33 pm
by FourthWorld
I'm inclined to consider a scrollable grouped set of fields as a custom picker. This would allow not only ample room for long entries, but can even provide subtext below the choice for further clarification, if that would be useful. But even with just the text itself, such a group would give you plenty of room, and in a context where the user can patiently review the options to make the best choice.
Re: Need a different MobilePick than the generic LC picker.
Posted: Sat Mar 06, 2021 6:46 pm
by DR White
That sounds great!
I had thought about something like that, but in the past I have experienced issues on Android platforms. On Android, when the user goes to scroll a group of selectable items, the item is selected during the scrolling process. With iOS, the selectable item is not able to be selected until the scroller has stopped (same code used in both platforms, just different platforms gives different behaviors to the same control). Have you got a solution for this? Maybe you can give me an example, although right now I am running Xcode 12.4 and LC will not support any of its simulators.
Re: Need a different MobilePick than the generic LC picker.
Posted: Sat Mar 06, 2021 10:39 pm
by Davidv
DR White wrote: ↑Sat Mar 06, 2021 6:28 pm
....
I like the behavior of the MobilePick. Radio button seem so outdated for a phone app.
What are some other options?
Shorten it? I can knock off 25% without changing essential content or sequence, thus:
'Run’ [Run/Off/Auto selector]: bad connection
Re: Need a different MobilePick than the generic LC picker.
Posted: Sat Mar 06, 2021 11:47 pm
by DR White
Davidv,
I don't think "'Run’ [Run/Off/Auto selector]: bad connection" will fit on iOS picker.
However, I will try it when LC supports Xcode 12.4.
Thanks,
David
Re: Need a different MobilePick than the generic LC picker.
Posted: Sun Mar 07, 2021 12:00 am
by Davidv
No problem. I do not know the particular limit, though even my preservationist effort has a few redundant characters. Significant improvement on length may require either making more assumptions about user understanding or placing some information in a header over the picker. I see that your longest other string is 35 chars, presumably an acceptable length compared with my 45 (I can make it 42...).
Davidv
eta: one can drop it to 35 simply by removing " selector" and the colon.
Re: Need a different MobilePick than the generic LC picker.
Posted: Sun Mar 07, 2021 2:16 am
by bwmilby
DR White wrote: ↑Sat Mar 06, 2021 6:46 pm
On Android, when the user goes to scroll a group of selectable items, the item is selected during the scrolling process. With iOS, the selectable item is not able to be selected until the scroller has stopped (same code used in both platforms, just different platforms gives different behaviors to the same control). Have you got a solution for this?
I think that Jacque has some code that handles this. Essentially you record the touch position on mouseDown and only process the mouseUp as a tap if the position hasn't changed (i.e. is was a tap and not a scroll).
Here's a behavior script that may be helpful for inspiration:
https://github.com/Himalayan-Academy/Si ... codescript
Re: Need a different MobilePick than the generic LC picker.
Posted: Sun Mar 07, 2021 3:12 pm
by DR White
Sounds Good!
I will try it when LC releases the update to support Xcode 12.4.
Thanks so much,
David
Re: Need a different MobilePick than the generic LC picker. - Solved
Posted: Sun Mar 07, 2021 3:48 pm
by DR White
I have never used "Command".
I have looked in dictionary, but not much description.
How is it different from "On xxx" (ex On OpenCard)?