Page 1 of 1

Default PUT to messageBox

Posted: Fri Jun 03, 2022 6:47 am
by richmond62
"over there" something stimulated me to have a messageBox rant.

If I have this is a button:

Code: Select all

on mouseUp
put "Happy Christmas"
end mouseUp
'Happy Christmas' will end up in the messageBox.

Personally I think it would be far better if that threw an error,
and to get something in the messageBox one would have to do this:

Code: Select all

on mouseUp
put "Happy Christmas" in msgBox
end mouseUp

Re: Default PUT to messageBox

Posted: Mon Aug 08, 2022 11:27 pm
by OpenXTalkPaul
richmond62 wrote: Fri Jun 03, 2022 6:47 am "over there" something stimulated me to have a messageBox rant.

If I have this is a button:

Code: Select all

on mouseUp
put "Happy Christmas"
end mouseUp
'Happy Christmas' will end up in the messageBox.

Personally I think it would be far better if that threw an error,
and to get something in the messageBox one would have to do this:

Code: Select all

on mouseUp
put "Happy Christmas" in msgBox
end mouseUp
Totally missed this post.

I frequently comment out a variable from the end of a line of script so I can quickly see what exactly would be getting put into that variable. For example, I used this technique to figure out why the Extension Builder stack wasn't opening any extension Demo stacks like it's supposed to (it wasn't passing a file path that the handler expected).

Code: Select all

on mouseUp
	put "Happy Christmas" -- into someContainer -- <--  'into someContainer' is temporarily commented out for testing
end mouseUp
This msg box a behavior I not-only expect in an xTalk, but find it very useful.