Go to card [with effects] is slow on Android

J. Landman Gay jacque at hyperactivesw.com
Sun Jan 26 15:16:01 EST 2014


On 1/26/14, 12:47 PM, Roger Eller wrote:
> They are all offending me.  ;-)
>
> TraversalOn (focusable) is checked for all fields the user needs to fill
> in.  I simply don't want any field to activate the on-screen keyboard as
> soon as the card opens.  I want the user to have a chance to see the whole
> screen and choose which field they wish to edit.

The auto-selection of the first object with traversalOn goes back to the 
dawn of the engine. I think it interferes more than it helps, and I 
rarely find the feature useful.

The engine will focus on the first object it finds that has traversalOn 
set to true. On Windows that can be either a field or a button. On Mac 
it's always a field.

Any attempt to script around it must occur after the openCard message 
fires, because the engine doesn't do the selection until after openCard.

Depending on my stack, I've used one of these workarounds:

1. Send a message in an openCard handler that will fire another handler 
after openCard is done. The interval can be very short, 1 millisecond 
should work. In the second handler you just "focus on nothing". There 
may or may be a breif cursor flash depending on the machine, but you 
have to be looking for it to see it.

2. No scripting required for this. Place an editable field on the card 
somewhere offscreen (like at -100,-100), with its traversalOn set to 
true. The engine will select that one but no one will see it. The field 
must be visible since the engine will skip over hidden fields.

3. If there are only a few fields, you can set the traversalOn to false 
on preOpenCard and set it back to true after openCard is done. This 
isn't as practical if you have a lot of fields, since you need to loop 
through them all, but it works okay for one or two fields and there is 
no cursor flash.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list