Default PUT to messageBox

All flavors welcome.
Forum rules
Be kind.
Post Reply
User avatar
richmond62
Posts: 2621
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Default PUT to messageBox

Post 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
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1487
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Default PUT to messageBox

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests