Sean,
You need to declare a global in each handler that uses it.
Excerpt from Trasnscript Dictionary ("global"):
"The global declaration must appear in each handler in which you use the
global. If you declare a global in one handler, and try to use it in
another without first declaring it in that handler, the second handler
treats it as a local variable, and it does not retain its value between
handlers."
Bruce
>-- Stack Script
>global g_smtp_nextTransaction, CRLF
>
>on openStack
> put empty into g_smtp_nextTransaction
> put numToChar(13) & numToChar(10) into CRLF
>end openStack
>
>-- Button 1 code
>on mouseUp
> put "CONN" into g_smtp_nextTransaction
>end mouseUp
>
>-- Button 2 code
>on smtp_conn
> put "next: " & g_smtp_nextTransaction & linefeed after field "debug"
>end smtp_conn
>
>(yes, that's my debug code)
>
>as far as i can tell, the code looks fine and should write "next: CONN" at
>the end of the field but what gets written is "next:
>g_smtp_nextTransaction"..
>
--
Bruce Lewis
Lewis & Collyer
160 John Street, Suite 401
Toronto, Ontario
Canada M5V 2E5
(416) 598-4357
FAX (416) 598-1067
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]