Inheritance problem?

Charles Szasz cszasz at mac.com
Fri Jun 13 20:48:08 EDT 2008


I created an app with two fields for entry of text and and 22 number only
fields. Despite NO code being in the two text fields followed by the numeric
fields, the two text fields have acquired the code of number boxes -
allowing only two digits! I tried the following code to allow alphanumeric
entry:

on keyDown pKey
     if pKey is in "abcdefghijklmnopqrstuvwxyz 1234567890" 
     then 
          pass keydown
     end if
end keyDown

However, the text fields still will not allow letters to be entered. Here is
the script for the numeric fields:

on keyDown whichkey
  if whichKey is a number then
    if the selection is not empty then delete the selection
    get value(the target)
    if the length of it < 2 then
      pass keyDown whichKey
    else
      beep 
    end if
    beep
  end if
  beep
end keyDown

This is the first time I ran into inheritance. And there are no stack or
card scripts that would cause this problem. I even deleted the text fields
and created new text fields but with the same results. The fields are not
locked and autoTab and Traversal are set to true. Any suggestions would be
greatly appreciated!
-- 
View this message in context: http://www.nabble.com/Inheritance-problem--tp17834406p17834406.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list