spontaneously resizing fields

Alex Rice alex at mindlube.com
Fri Jan 2 14:48:38 EST 2004


OK here is a recipe. Is this an IDE bug, or something I am doing wrong?

- create a mainstack and add 1 field to it.
- make the fld height 22.
- set the card's script to the script, below.
- Repeatedly do this
	cmd-shift-a
	type in field
	cmd-shift-a
	type in field
	cmd-shift-a
	...
- each time the focus of the field is lost, the height increases by 4.
- the lockLoc setting has no effect	
- if you are not seeing the height increase, delete the contents of the 
fld, then do cmd-shift-a, etc, again.

-- card script
local lFldLocked

on commandKeyDown pKey
   if pKey = "a" and the shiftKey = "down" then
     put (not lFldLocked) into lFldLocked
     updateUI
     exit commandKeyDown
   end if
   pass commandKeyDown
end commandKeyDown

on updateUI
   if lFldLocked <> true then
     set the lockText of fld 1 to true
     set the showFocusBorder of fld 1 to false
   else
     set the lockText of fld 1 to false
     set the showFocusBorder of fld 1 to true
     select text of fld 1
   end if
   if (lFldLocked <> true) and (fld 1 = empty) then
     disable fld 1
   else
     enable fld 1
   end if
end updateUI

Alex Rice <alex at mindlube.com> | Mindlube Software | 
<http://mindlube.com>

what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco



More information about the use-livecode mailing list