Menu

#1155 Quit in .onUserAbort behaves weirdly

3.0 Alpha Series
open
nobody
None
5
2017-05-28
2016-08-12
Marshall
No

Latest 3.0, haven't tested older versions.

Calling Quit inside .onUserAbort acts like Abort (we don't quit), but when you then click Next/Install, it quits.
I'm guessing the quit message is posted but not handled until the next event.

Yes, it's silly to call Quit in .onUserAbort, so this is very low priority - but it should quit immediately, or be ignored completely.

Discussion

  • Marshall

    Marshall - 2016-08-12

    Apologies, right now I cannot replicate this using a simple script. It's definitely happening, but it appears that something else in my script is contributing to the weird behavior, although I don't know what yet. I'll post an example when I figure it out.

     
  • Marshall

    Marshall - 2016-08-12

    Okay, replicated

    OutFile "example.exe"
    
    PageEx custom
        PageCallbacks __onPageShow_welcome
    PageExEnd
    
    Section dummy
    SectionEnd
    
    Function .onUserAbort
        Quit
    FunctionEnd
    
    Function __onPageShow_welcome
        nsDialogs::Create 1044
        nsDialogs::Show
    FunctionEnd
    
     
  • Anders

    Anders - 2017-05-27

    I'm guessing this only happens on custom pages?

    Function .onUserAbort
        SendMessage $HWNDPARENT 0x408 0 ""
        Quit
    FunctionEnd
    

    seems to work but it is a bit of a hack.

     
  • Marshall

    Marshall - 2017-05-28

    Indeed, it appears to be due to nsDialogs taking over the message loop.

     

Log in to post a comment.

MongoDB Logo MongoDB