Page 1 of 1

Simple field improvements

Posted: Fri Aug 21, 2015 11:06 am
by rinzwind
1) When a field locktext property is true it should still be still possible to select and copy text from it to clipboard
2) A password char property
3) Multiline property (new lines end up in 1 line fields now by mistake)
4) Plain text property (copy & pasting also results in plain text)

These are things new users are frequently looking for. It is possible to work around them but it should be just there out of the box.

Re: Simple field improvements

Posted: Fri Aug 21, 2015 8:01 pm
by jacque
You can select and copy text from a locked field if the locktext, traversalOn, and autoHilite of the field are all true.

Password characters can be simulated by using an imagesource for each keystroke (my favorite technique) or by including a custom font, or substituting bullets. If you mean there should be a dedicated password field that does that automatically, I think a lot of people would like to see that but the workaround is pretty easy.

Not sure what you mean by "multiline" fields. All fields are multiline by default. Can you say more about this?

Plain text is available on both copy and paste. The default in the IDE is to always paste the styled text, but you can use the "Paste Unformatted" menu item in the Edit menu for plain text. Copying always includes all types of text, so the clipboardData always has everything in it.

Re: Simple field improvements

Posted: Fri Aug 21, 2015 8:17 pm
by Simon
Isn't #2 just "ask password"?

Simon

Re: Simple field improvements

Posted: Sat Aug 22, 2015 9:50 am
by rinzwind
Nope you can't copy and paste text from field when those conditions apply. Yes you can in the IDE, but not in the standalone finished app.

multiline as in default single line... one expects that if they add a single line text field to a form it IS single line. But in LC every textfield is multiline and it takes some effort to prevent entering multiple lines in it. It's inconvenient.

Like I already said.. there are workarounds. But those should not be necessary.

Re: Simple field improvements

Posted: Sat Aug 22, 2015 10:04 am
by SparkOut
set tabOnReturn to true in order to prevent a carriage return input in a single line field.

A password field made by the engine would be good, but there are many examples of people writing roll-your-own code for this. (And no, an ask dialogue doesn't cut it)

Copy pasting from a locked text field in a standalone is something I'm sure I've done in the past. I can't remember specifics but there are some settings that were needed. If they don't work now, then it's probably something that has been introduced in recent versions. I'd be surprised if someone hadn't already raised that as an issue if so. If I get a chance later I will have a test.

Re: Simple field improvements

Posted: Sat Aug 22, 2015 5:48 pm
by jacque
Does your standalone have an Edit menu or a commandKey handler? Copy /paste won't work without one of those.

If the standalone is for mobile, you need a native field instead.

Re: Simple field improvements

Posted: Fri Sep 25, 2015 3:22 pm
by Fjord
What is a "native field"? How do I make one in LC8?
I have a text field (with scroller), I want it with select, cut copy paste. Also, how do I get the typing helps (expansion, mistakes correction)?

Re: Simple field improvements

Posted: Fri Sep 25, 2015 3:37 pm
by Klaus
Hi Fjord,
Fjord wrote:What is a "native field"? How do I make one in LC8?
Jacque is talking a bout (iOS & Android) native controls that you can create via -> "mobilecontrolcreate"
Check the dictionary for more infos.
Fjord wrote:I have a text field (with scroller), I want it with select, cut copy paste.
Also, how do I get the typing helps (expansion, mistakes correction)?
You will all this have automatically when using "native" (text) controls :D


Best

Klaus

Re: Simple field improvements

Posted: Mon Sep 28, 2015 5:49 pm
by Fjord
Thanks, Klaus!
Do you happen to know why Livecode fields do NOT translate to native IOS fields (as might be expected)? I guess there must be a good reason...

Re: Simple field improvements

Posted: Mon Sep 28, 2015 6:24 pm
by Klaus
No idea, sorry!