list field not getting arrowkey msg
Peter Brigham
pmbrig at gmail.com
Mon Jul 20 14:47:59 EDT 2015
Unfortunately, I still get nothing with "the hilitedlines of me" in the
field script. The arrowkey message is not going to the field.
Here's the arrowkey handler in the card script. This works fine but I don't
know why it should be necessary.
on arrowkey what
put hilitedline of fld "notesList" into lineNbr
put the number of lines of fld "notesList" into totNbr
switch what
case "left"
case "right"
pass arrowkey
break
case "up"
if lineNbr = 1 then
put totNbr into nextLineNbr
else
put lineNbr - 1 into nextLineNbr
end if
break
case "down"
if lineNbr = nextLineNbr then
put 1 into nextLineNbr
else
put lineNbr + 1 into nextLineNbr
end if
break
end switch
set the hilitedline of fld "notesList" to nextLineNbr
put line nextLineNbr of fld "notesList" into listEntry
put getItem(listEntry, 1, tab) into noteTitle
displayNote noteTitle
pass arrowkey
end arrowkey
-- Peter
Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig
On Mon, Jul 20, 2015 at 2:14 PM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:
> On 7/19/2015 10:17 PM, Peter M. Brigham wrote:
>
>>
>> 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.
>>
>
>
> What do you get if you put this into the field script:
>
> on mouseUp
> put the hilitedlines of me
> end mouseUp
>
> BTW, I think your arrowkey test needs "of the target". Hilitedlines
> without an object reference is probably always empty.
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> _______________________________________________
> 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