Devin Asay wrote:
> It turns out that you can still call functions directly from the
> message box, but the form you have to use has changed. Prior to
> 6.x you would do this:
>
>   put myFunction("foo")
>
> Now you don't have to (indeed you cannot) embed the function in
> a put statement:
>
>   myFunction("foo")
>
> I only thought to try the 2nd variant because this is how HyperCard's
> message box used to work. I'm not sure if the new behavior is a bug
> or a feature. :)

I would call it a bug, since both forms should work.

They've done some work on Message Box execution context recently, and perhaps that's where the chance occurred, but while I haven't looked at RunRev's MB code I know that in MC any expression that doesn't have a command is internally turned into one by prepending "put" on it so that it can be executed.

I wonder if the issue here may be that the latest version of the Message Box is always prepending "put", even if a "put" is already there, which would give us things like:

   put put myFunction("foo")

...which would of course be invalid to the engine.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to