A problem with Return in a field

Devin Asay devin_asay at byu.edu
Mon Dec 11 12:01:49 CST 2006


On Dec 11, 2006, at 10:17 AM, J. Landman Gay wrote:

> Devin Asay wrote:
>> Charles,
>> (I've been following this discussion on the use-rev list, so I'm  
>> taking the liberty to post it there too.)
>> I suspect your problem may be related to the fact that you have a  
>> keyDown handler in the field that may be blocking the return key.   
>> (Although it's not supposed to.) It should work if you force the  
>> return key to "tab" to the next field by including a returnInField  
>> handler:
>> on returnInField
>>   get the number of me
>>   select the text of fld (it + 1)
>> end returnInField
>> Anybody know why the keyDown handler blocks the autoTab? Maybe a  
>> candidate for bugzilla?
>
> It doesn't. I just tried it with the above script and it works fine.
>
> I suspect his field is sized to include too many lines, so it  
> accepts returns until it hits the last line.

I keep learning new things about Rev after all these years. I didn't  
realize that autoTab checked the height of the field and inserted  
Return chars until the text reached the bottom of the field, and only  
then tabs to the next field. Very elegant.

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list