i don't know why it would be giving this alert multiple times, unless you're
constantly calling this method in a repeat loop or an exitFrame. If you are,
you might want to stray from that practice, imo. Base the check on another
event, such as a mouse click on a button, etc. If you're just trying to
limit the number of characters in a field, set the field to "Limit to field
size" in the inspector. This may also do what you need.

--//untested lingo, but the general idea
on checkChar
  if member("Body").text.length > 150 then
     strTemp = chars(member("Body").text, 1, 150)
     member("Body").text = strTemp
  end if
end
--//

samn

-----Original Message-----
From: Tony �str�m <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, February 05, 2002 2:48 PM
Subject: <lingo-l> to many characters


>Hi List ,
>
>when I paste for example 200 characters into the member("Body") it went
>completey crazy. Alert,
>alert , alert , alert , alert , alert , alert , alert , alert , alert
>.............
>How can I prevent this and auto. delete the character(s) after the 150 ?
>
>I use the lingo belowe:
>
>on checkChar
>  if member("Body").text.length > 150 then
>    if gLang = "eng" then
>      alert "Max 150 characters. Should you need more then please state
>it in your e-mail."
>    else if gLang = "fra" then
>      alert "Max 150 caract�res. Si vous avez besoin de plus de place,
>contacter nous par E-mail."
>    end if
>  end if
>end
>
>TIA
>Tony
>
>[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]
>

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to