the message box
Ken Ray
kray at sonsothunder.com
Fri Aug 19 11:51:36 EDT 2005
On 8/19/05 8:57 AM, "Björnke von Gierke" <bvg at mac.com> wrote:
> On Aug 19 2005, at 15:51, Jon wrote:
>
>> ...
>> Any idea why the Message Box is suddenly getting triggered?
>> ...
>> Here is the current code:
>>
>> on DisplayMessage msg
>> put the long time & " " & msg & Return after field "Memo" set the
>> vScroll of field "Memo" to the formattedHeight of field "Memo"
>> end DisplayMessage
>
> msg is a reserved word indicating... the message box :) try to use a
> different name for your var and all should be fine.
This is another reason why a lot of us use "Hungarian Notation (lite)"
(http://www.fourthworld.com/embassy/articles/scriptstyle.html), where
variables, parameters, etc. are preceded by a special character. In your
case, since "msg" is a parameter to the DisplayMessage handler, it would be
"pMsg", which doesn't interfere with any reserved words.
Not that it isn't *impossible* to overlap reserved words this (tExt =
'text', sIn = 'sin', etc.), but it *is* very rare that this would happen.
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list