another weird table field behavior
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Thu Sep 25 16:48:23 EDT 2008
Re,
Le 25 sept. 08 à 22:38, Eric Chatonet a écrit :
> Bonsoir Mickey,
>
> First question:
> Why do you want to script a feature that exists yet without any
> scripting?
> Generally, you only choose to script a different behavior than
> usual one:
> For instance to make arrow keys to act in carousel:
>
> on arrowKey pKey
> switch pKey
> case "up"
> if the hilitedLine of field "ResultList" = 1 then set the
> hilitedLine of field "ResultList" to the number of lines of field
> "ResultList"
> else set the hilitedLine of field "ResultList" to the
> hilitedLine of field "resultList" - 1
> break
> case "down"
> if the hilitedLine of field "ResultList" = the number of lines
> of field "ResultList" then set the hilitedLine of field
> "ResultList" to 1
> else set the hilitedLine of field "ResultList" to the
> hilitedLine of field "resultList" + 1
> end switch
> end arrowKey
>
> Second question:
> I have no idea :-(
I said I had no idea but there is a logical response:
When you hit the return key and there is an insertion point into a
field, returnKey is not sent but returnInField is sent to the field
that is selected.
So a returnInField handler in the card script might be your friend.
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list