Skip navigation
Peter S Price
Currently Being Moderated

MIAW crashes Win projector

Jun 14, 2012 7:48 PM

Tags: #crashing_when_starting #miaw

I have used Director 7 quite a bit, but am still learning Dir 11.5 as a newbie.

 

I want to use a MIAW to show a "tutorial" window with buttons that control handlers in the main window. It works in the editing window, but when I run the projector (in Windows XP) it crashes as soon as I try to call the MIAW:

 

on mouseUp me

  sWindow = window().new ("Script")

  sWindow.filename = "TeachScr"

  sWindow.open()

  put "Window should be open"

end mouseUp

 

I am wondering if I need another Xtra to handle MIAWs?

 

Any help gratefully received - thanks.

 
Replies
  • Currently Being Moderated
    Jun 15, 2012 1:03 AM   in reply to Peter S Price

    When you open the file with this code in it and execute

    put the scriptExecutionStyle

    from the Message Window, what does it report?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2012 5:22 AM   in reply to Peter S Price

    Hi,

    Try this

     

    on mouseUp me

    if  _player.windowlist.getone(window("Script"))=0 then

      sWindow = window().new ("Script")

      sWindow.filename = "TeachScr"

    end if

      sWindow.open()

      put "Window should be open"

    end mouseUp

     

                                                      or

     

    on mouseUp me

      sWindow = window().new ("Script")

      sWindow.filename = "TeachScr"

      sWindow.open()

      put "Window should be open"

    end mouseUp

     

    on closewindow me

    window("window name").forget()

    end

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2012 6:11 AM   in reply to murali_kumar

    sWindow = window().new ("Script")  <-- this line seems to have a very minor problem... try removing the space between new and ("Script"). It's in the OP's code and in the responder's code. I haven't tested to see if the code works, but considering the error the OP was getting and I've never seen that exact syntax with the space before, I'd guess that was the problem.

    murali_kumar wrote:

     

    Hi,

    Try this

     

    on mouseUp me

    if  _player.windowlist.getone(window("Script"))=0 then

      sWindow = window().new ("Script")

      sWindow.filename = "TeachScr"

    end if

      sWindow.open()

      put "Window should be open"

    end mouseUp

     

                                                      or

     

    on mouseUp me

      sWindow = window().new ("Script")

      sWindow.filename = "TeachScr"

      sWindow.open()

      put "Window should be open"

    end mouseUp

     

    on closewindow me

    window("window name").forget()

    end

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2012 7:45 AM   in reply to Peter S Price

    I tried your code on my Windows XP SP3 box using D11.5.8 and it works fine. I don't know why you get an error.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 16, 2012 12:24 AM   in reply to Peter S Price

    So ... instead the projector crashes as soon as the miaw is called.

    What happens when you run it in the authoring environment? Any error messages?

    What does "crashes" mean? Vapourises without any feedback, or ... ?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 16, 2012 3:27 PM   in reply to Peter S Price

    Would you like to send your files, as a zip archive, to sean (dot) n (dot) wilson (at) gmail (dot) com and I'll have a look and see if there's anything to be fixed.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 20, 2012 1:20 PM   in reply to Peter S Price

    Your appreciation is humbling.

     

    I meant to add that you can use 'deactivateApplication' in place of 'deactivateWindow' if you need to react to the user Alt-Tabbing away from your program.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points