list field not getting arrowkey msg

Peter M. Brigham pmbrig at gmail.com
Sun Jul 19 23:17:39 EDT 2015


On Jul 19, 2015, at 10:12 AM, Mike Bonner wrote:

> Not sure if this is what you're seeing, but if you are using tab to enter
> the next field, then using arrow keys to navigate up and down, it doesn't
> work. (6.7.6) When you tab into a list field, the hilite remains, but there
> is no selection in the field. IE no insertion point, so the arrow keys
> don't work.

Not using tab to select into the field. Clicking on the line, it gets selected, then arrowkey does nothing.

> I've found that if you select the hilited line as you tab into the field it
> solves this problem.
> 
> If this is the problem you are seeing, clicking a line in the recalcitrant
> field should make the arrow keys start working, because the click selects a
> line.
> 
> Another direction to solve it would be to catch the arrowkey message in the
> field, and if there is a hilite, but no lines selected, select the hilited
> line then pass arrowkey. If there are no lines selected, and no hilites,
> select and hilite the first line.  If I understand correctly, the second
> part should only be necessary if you have toggle hilites turned on.
> (because otherwise when you tab into the field, a line is selected.)

There is a line selected. If I put the following into the field script:

on arrowkey
   put the hilitedlines
end arrowkey

then click in the field to select a line, then hit up- or down-arrowkey, nothing happens. The field is apparently not getting the arrowkey message. It's acting as though the traversalon of the field is false, but it's not.

> I just noticed another interesting thing (Still in 6.7.6)
> 
> Selecting "click to toggle" in the inspector puts a checkmark into
> mutli-line and non-contiguous (as it should?) but clicking away and coming
> back to the object, only click to toggle is still selected.

toggleHilites, mulitpleHilite, and noncontiguousHilites are all false.

> Oh, and final note on this, if you have multiline non-contiguous selected
> you'd have to account for that too.
> 
> Check the focused object when the arrow keys aren't working. If the correct
> field is focused, check the selectedline to see if there is one. If not,
> the arrow keys fail to work.

if I put this into the card script:

on arrowkey what
   put the short name of the focusedobject
   pass arrowkey
end arrowkey

then click on a line in the list field, then hit up-arrowkey, I get

card id 1002

???

Having found that the focus is on the card, for reasons best known to the engine (certainly not to me), I have a workaround, by putting an "on arrowkey" handler into the card script and then hiliting the next/prev line of the field and duplicating the relevant portion of the field mouseUp handler in the card script -- but I don't know why I should have to do that. Why isn't the field getting the arrowkey message after I click on a line in the field??? That works fine in my other stack, with the list field having the same properties.

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig


> On Sun, Jul 19, 2015 at 7:07 AM, Peter M. Brigham <pmbrig at gmail.com> wrote:
> 
>> I have a list field in one stack that isn't behaving properly. List fields
>> are supposed to allow up and down arrowkeys to move the hilited line. From
>> the dictionary: "If a field's listBehavior property is set to true, and the
>> user clicks a line, the entire line is highlighted. The Up and Down arrow
>> keys move the selection up or down." I have a similar field in another
>> stack that works exactly as expected. The two fields both have their
>> listbehavior set to true -- in fact, AFAICS all their basic properties are
>> the same. I have no arrowkey handlers in any scripts in the misbehaving
>> stack.
>> 
>> Ideas?
>> 
>> -- Peter
>> 
>> Peter M. Brigham
>> pmbrig at gmail.com
>> http://home.comcast.net/~pmbrig
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list