In a Macintosh D8.x projector, the MUI xtra will fail to complete execution
of an alert() or a runDialog() call if:
1. The return() command is used on the output value
2. The script containing the instructions for the MUI alert
is not in castLib 1
This error does not occur on Windows, on Mac in D7.0.2 or DMX, or in
author-mode.
Steps to reproduce.
1. Create a new movie in Director 8.0 or 8.5 on a Macintosh.
2. In castLib 1, create a new movie script member with the
following scriptText:
on startMovie()
tList = [#buttons: #Ok, #title: "Title", #message: "Message"]
tResult = xtra("Mui").new().alert(tList)
return tResult
end
3. Save the movie as "MUI Test.dir".
4. Create a stub movie with a movie script member with the
following scriptText:
on startMovie()
go movie "MUI Test"
end
5. Choose Modify | Movie | Xtras... and remove all xtras
references from the movie, so that none are bundled into
the projector. Save the movie.
6. Create a projector from this stub movie.
7. Create a folder named Xtras alongside the projector and
copy the MUI xtra into it.
8. Run the projector.
9. You should see a dialog box. Click on the OK button to
dismiss it. (You may have to do this twice, since
startMovie is called twice, but that's a different issue).
So far, so good. Now:
10. In your MUI Test movie, create a second castLib. It
doesn't matter whether it is internal or external.
11. Move the movie script with the startMovie() handler to
castLib 2.
12. Save the movie.
13. Run the projector again.
14. Click on the OK button to dismiss the dialog.
15. This time you receive an alert...
Director Player Error
Script Error. Continue?
16. ... and you have to force quit the movie.
Even when the script is in a cast other than castLib 1, the error does not
occur if the value output by the MUI xtra is not 'return'ed:
17. In your MUI Test movie, comment out the last line of the
startMovie handler.
-- return tResult
18. Run the projector again.
19. This time, there is no script error when you dismiss the
dialog.
You will get similar results if you build your own dialog and use the
muiInstance.runDialog() method to display it.
Workarounds:
* In D8.x, always place the scripts that call use the MUI xtra
in castLib 1
* Upgrade to DMX where the bug is fixed
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL
PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping
with programming Lingo. Thanks!]