Thanks for the tips regarding a field which number of lines stays
constant but allows the user to add and delete characters.

Kevin�s tip for trapping the backspaceKey message works very well:

    on backSpaceKey
      put word 4 of the selectedChunk into tCharNo
      if charToNum(char tCharNo of me) is not 10 then pass backSpaceKey
    end backSpaceKey

I added a similar script to trap the deleteKey message:

    on deleteKey
      put word 2 of the selectedChunk into tCharNo
      if charToNum(char tCharNo of me) is not 10 then pass backSpaceKey
    end deleteKey

which deletes characters "forward" but not return characters.

Actually the suggested script for taking the cursor one line down in the
field instead of adding a new line in the field does�nt work:

    on returnInField
      put word 2 of the selectedLine into tLineNo
      add 1 to tLineNo
      select before line tLineNo of me
    end returnInField

when I press the returnKey there are still lines added to the field.

Instead of this I now use:

on returnInField
  put the number of lines of fld "names" into numlin
  put the initLineNum of this stack into initVal # custom prop to store
the initital number of lines
  if numlin = initVal - 1 then exit returnInField
  else pass returnInField
end returnInField


Thanks again for the tips
----------
Sven

Reply via email to