focus on nothing

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

focus on nothing

Postby Thierry » Wed Jun 07, 2017 5:16 pm

Hi,

When starting my iPhone/iPad app
in the preopencard handler I have

focus on nothing

to avoid the keyboard showing off.

Tried out on the opencard handler too.

But it doesn't work :shock:

What do I miss?

Thierry
Thierry Douez - https://sunny-tdz.com
sunnY(rex - text2speech - perl - midi - image - pdf)
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 557
Joined: Wed Nov 22, 2006 3:42 pm
Location: France

Re: focus on nothing

Postby jmburnod » Wed Jun 07, 2017 5:37 pm

Hi Thierry,
Do you have a fld with traversalon = true int your cd ?
Jean-Marc
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1928
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève

Re: focus on nothing

Postby Thierry » Wed Jun 07, 2017 5:47 pm

jmburnod wrote:Hi Thierry,
Do you have a fld with traversalon = true int your cd ?
Jean-Marc


Bonjour Jean-Marc,

Merci, this does the trick but then...

I can't select my fields to type in.

I have a group containing 2 fields ( email, password)

Cordialement,

Thierry
Thierry Douez - https://sunny-tdz.com
sunnY(rex - text2speech - perl - midi - image - pdf)
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 557
Joined: Wed Nov 22, 2006 3:42 pm
Location: France

Re: focus on nothing

Postby jmburnod » Wed Jun 07, 2017 5:58 pm

We discussed this topic here
http://forums.livecode.com/viewtopic.php?f=49&t=10514&hilit=keyboard&start=15#p150686
It seems we have to work with a locked fld.
I'm working for a locked fld with a custom insertion cursor.
You can get one in this thread
All the best
Jean-Marc
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1928
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève

Re: focus on nothing

Postby Thierry » Wed Jun 07, 2017 6:23 pm

Merci Jean-Marc,

but I don't think it's the same problem.

I would like the card to be opened without the keyboard and as soon as the user tap
into one of 2 the fields, the keyboard should pop-up; nothing more.

Might be again a wrong settings between the group and 2 the fields ?

Can't believe this should not work in an easy way :shock:

Any other hints ?

Thierry
Thierry Douez - https://sunny-tdz.com
sunnY(rex - text2speech - perl - midi - image - pdf)
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 557
Joined: Wed Nov 22, 2006 3:42 pm
Location: France

Re: focus on nothing

Postby jmburnod » Wed Jun 07, 2017 8:54 pm

Ok,
Why not set flds traversalon = false and lock folds on preopencard and send a message in time to unlock flds and set traversalon of flds to true
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1928
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève

Re: focus on nothing

Postby Thierry » Thu Jun 08, 2017 6:24 am

jmburnod wrote:Why not set flds traversalon = false and lock folds on preopencard and send a message in time to unlock flds and set traversalon of flds to true

Jean-Marc you're the hero of the day 8)

After some tries, it works fine.

However, I'm still struggling understanding the meaning and the role of:

focus to nothing

Someone could explain ?

Kind regards,

Thierry
Thierry Douez - https://sunny-tdz.com
sunnY(rex - text2speech - perl - midi - image - pdf)
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 557
Joined: Wed Nov 22, 2006 3:42 pm
Location: France

Re: focus on nothing

Postby jacque » Thu Jun 08, 2017 6:09 pm

This has been a problem since MetaCard. The workaround you found is the usual way to handle it, though I haven't ever had to lock the field, I only had to turn off traversalOn.

Recently I found another way. On preopencard choose the edit tool. This turns off the automatic selection behavior. On opencard, send a message to choose the browse tool in 0.

That way you don't need to alter any field properties.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3794
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN

Re: focus on nothing

Postby Thierry » Thu Jun 08, 2017 7:19 pm

jacque wrote:This has been a problem since MetaCard.
The workaround you found is the usual way to handle it, though I haven't ever had to lock the field, I only had to turn off traversalOn.

Thanks Jacque for this clarification :D

In fact, I'm only switching traversalOn from false to true.

Kind regards,

Thierry
Thierry Douez - https://sunny-tdz.com
sunnY(rex - text2speech - perl - midi - image - pdf)
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 557
Joined: Wed Nov 22, 2006 3:42 pm
Location: France

Re: focus on nothing

Postby Dixie » Fri Jun 09, 2017 11:20 am

Thierry..

Why not just use native fields, then there are no more problems ..

dixie
Dixie
Livecode Opensource Backer
Livecode Opensource Backer
 
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: focus on nothing

Postby Thierry » Fri Jun 09, 2017 12:18 pm

Dixie wrote:Why not just use native fields, then there are no more problems ..

Thanks Dixie,

In between us, this is what I was doing all the time till this week :roll:

Otherwise, considering any projects from the customer's perspective,
the developer can't always choose the subjective best option.
( this project is a multi-platform one with few developers)

learning everyday forever....

Thanks again for the tip

Thierry
Thierry Douez - https://sunny-tdz.com
sunnY(rex - text2speech - perl - midi - image - pdf)
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 557
Joined: Wed Nov 22, 2006 3:42 pm
Location: France

Re: focus on nothing

Postby FourthWorld » Fri Jun 09, 2017 4:44 pm

Thierry wrote:
Dixie wrote:Why not just use native fields, then there are no more problems ..

Thanks Dixie,

In between us, this is what I was doing all the time till this week :roll:

Otherwise, considering any projects from the customer's perspective,
the developer can't always choose the subjective best option.
( this project is a multi-platform one with few developers)

I'm curious: given the complexity and cost involved with attempting to emulate mobile OS text editing in a LC field, what benefit of using an LC field is the customer interested in?

Maybe even more interesting: if you're able to emulate OS text editing features, are they generalized enough to share? Some may be willing to pay well for such a challenging solution, esp. mobile apps that need styled text.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 5305
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles

Re: focus on nothing

Postby Thierry » Fri Jun 09, 2017 5:57 pm

given the complexity and cost involved with attempting to emulate mobile OS text editing in a LC field

Thanks Richard for coming in .. Mmm, may be a bit late.

Telling me this when I've started the 2 threads few days ago, this would have been very valuable!

Anyway, now I know for the future :)


But how do you know if this solution is not less costly in a whole project which I didn't talk about?

And what are the problems others are experiencing with LC fields?



Have a nice week-end; mine will be to focus on nothing (no phone, no computers) :roll:
and thanks again for all those who came in to help.

Thierry

PS: As I'm not a native English speaker, I do apologize for all my English-like writing.
Thierry Douez - https://sunny-tdz.com
sunnY(rex - text2speech - perl - midi - image - pdf)
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 557
Joined: Wed Nov 22, 2006 3:42 pm
Location: France

Re: focus on nothing

Postby jacque » Sat Jun 10, 2017 5:31 pm

The primary drawback of LC fields on mobile right now is the lack of copy/paste features, which I don't think we can emulate in script.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 3794
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN

Re: focus on nothing

Postby FourthWorld » Sat Jun 10, 2017 7:53 pm

Thierry wrote:
given the complexity and cost involved with attempting to emulate mobile OS text editing in a LC field

...But how do you know if this solution is not less costly in a whole project which I didn't talk about?

I don't. When I started doing mobile work I made some test stacks to get a feel for what's involved. I noticed a lot of work went into supporting mobile-OS-native fields, so I made some comparisons, which led to me question here.

And what are the problems others are experiencing with LC fields?

Like Jacque said, copy and paste are biggies. But equally important IMO is general editing behavior, the way the selection handles look and behave, the appearance of an editing context menu when a selection is active, and other things users have come to expect.

There's a new field control in the works to provide us with a more uniform way of working, dependent on the LC Builder features being refined now:
https://livecode.com/project/infinite-l ... ld-object/

But in the meantime the dynamic instantiation of mobile-OS-native fields delivers the best user experience for most apps.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 5305
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles


Return to iOS Deployment

Who is online

Users browsing this forum: No registered users and 1 guest