Menu

#1168 Components Page options rehide problem (no page recreate option)

3.0 Series
open
nobody
5
2016-12-16
2016-12-09
andry81
No

Have an installer with custom options set before the Components Page.
Custom options offer the setup type selection: client or server.

When the user selects Components Page options all options related to not selected type is hidden.
If user returns back to the setup type selection and chooses another option, then there is no option to recreate Components Page and so all options related to the opposite type of setup is visible (all options related to selected type of setup will still be hidden).

I need to rehide option in Create (Pre) phase because SysTreeView32 control used from the page has an options hidding issue: it can hide/show options only in Create (Pre) phase, but the Create phase already been executed for the Components Page once. Only the Show available which is useless for Components Page options hiding. Set a text to empty wont hide any option there.

Has the NSIS any official way to recreate a page from another page?

Discussion

  • Anders

    Anders - 2016-12-10

    I have no clue what you are talking about. Please post some example code that reproduces the problem.

     
  • andry81

    andry81 - 2016-12-13

    Sorry for confusing description. Had no time to describe it in details.
    I've attached an example demonstrating the issue.
    Actually, this is not a problem of the Components Page. This is an issue of sections. I can not revert their state before change their state in a Pre function.

    Steps to reproduce:
    1. Run test.exe
    2. Select Setup Type, click Next
    3. (another issue not related to this one, does not matter here) Select Setup Type again, click Next
    4. Observe one checkbox in the Components Page
    5. Click back, select opposite Setup Type option, click Next
    6. (the issue) Observe nothing in the Components Page

    Workaround:
    1. define the WORKAROUND definition

    Function ComponentsPre
      ; the issue place
      #RevertAllSections ; no such API to resolve the issue
    
      ${If} $RadioButton_ClientSetup = ${BST_CHECKED}
    !ifdef WORKAROUND
        ${ShowSection} ${CLIENT_SECTION} "${CLIENT_STUFF}"
    !endif
        ${HideSection} ${SERVER_SECTION}
      ${ElseIf} $RadioButton_ServerSetup = ${BST_CHECKED}
    !ifdef WORKAROUND
        ${ShowSection} ${SERVER_SECTION} "${SERVER_STUFF}"
    !endif
        ${HideSection} ${CLIENT_SECTION}
      ${EndIf}
    FunctionEnd
    
    1. Why i have to Reshow all sections when i cound just hide those not related to install?
    2. I have to put a correct section text in the ShowSection macro, because text can just change from option to option too. It will make a headache to write down code completely correct because not releated to Show-only options appears in the logic (for example, the HideSection will interfere with parent sections/groups and can make them partially selected, so i have to predictinally remove Readonly flag from all such sections before hide them (another way would be much more complicated) and so on).

    PS:
    Found another issue with the Custom Page (see above steps), but have no time to find out why it is happens.

     

    Last edit: andry81 2016-12-13
  • Marshall

    Marshall - 2016-12-16

    I'm not sure I follow either - you seem to talk about what you have to do to work around the problem but not what the actual problem is. Based on the work around, could the problem be related to this:
    https://sourceforge.net/p/nsis/bugs/1025/

     
    • andry81

      andry81 - 2016-12-16

      Why i have to workaround this at all? It exists only because of lack in implementation. I have to remember previous states instead of just revert to beggining. Actual installer can has much more options to tick/untick and it becomes a real pain to protect all of them from unexpected hide/untick.

      https://sourceforge.net/p/nsis/bugs/1025/

      That is example of another unexpected and annoying NSIS behaviour which NSIS users have to workaround.

       

      Last edit: andry81 2016-12-16

Log in to post a comment.