Announcement

Collapse
No announcement yet.

packages_selection

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • packages_selection

    HI,
    I need some here. I have 9 packages named as pack1, pack2, pack2, pack3........pack9.

    Now i was to have a way so that only one pack out of pack1 and pack2 and pack3 and pack3 are selectable. All the others the client can selct as he wants.

    So basically how to impose exclusivity, like only one of the four can be selected.

    thanks
    daniel

  • #2
    Re: packages_selection

    It will probably be best to use a Radio Buttons screen for those four packages instead. Check boxes should never be "forced" to be mutually exclusive; that breaks all the rules of interface design and would only serve to confuse your users.

    If you want your users to be able to choose "only one or none" of those four, create a single package that represents all four packages as a group. If the user selects that package, then conditionally display a Radio Buttons screen to let the user select which of the four packages they want.

    You'll need to understand how package variables work in order to accomplish this, so read chapter 2 and chapter 11 in the User's Guide.

    Chapter 11 also explains important concepts like how to properly name packages. Pack1, pack2 and pack3 are not descriptive names; naming things like that will only cause you grief in the long run.
    --[[ Indigo Rose Software Developer ]]

    Comment


    • #3
      Re: packages_selection

      there is kool work around i found, by using the CHECK BOXES.

      i have four check boxes, values stored in four different variables. lets say, for chk box 1= %box1%, and box2= %box2%....%box4%

      Go to after screen evaluations and this code

      If )(%box1%=False)and(%box%=False)and(%box%=False)and (%box1%=False))

      assign value(%PreventNextPage%)

      Show Message box (none selected, select only one)
      endif
      ------------
      the above code forces the user to select one option.
      ------------
      in my case the user has to select only one option. with the above code i solved if none selcted.
      -----------
      what if if the user selects more than one
      --------
      here is the code

      if ((%box1%=true)and(%box2%=true)) or
      ((%box2%=true)and(%box3%=true)) or
      ((%box3%=true)and(%box4%=true)) or
      ((%box1%=true)and(%box3%=true)) or
      ((%box1%=true)and(%box4%=true)) or
      ((%box2%=true)and(%box4%=true))
      assignvalue((%PreventNextPage%)
      showmessagbox (hey hey, just select only one option)
      end if
      -----------
      hope this can be of use to some one,
      -----------
      is a better way to impliment it than this clumsy 101 level.
      thanks
      daniel

      Comment


      • #4
        Re: packages_selection

        assign value(%PreventNextPage%=true)---
        sorry about the error in my previous page, dont curse me if ever tried this out, but just read this one.

        Comment


        • #5
          Re: packages_selection

          Just a quick tip:

          %a% by itself is the same as %a%=true

          So you can do something like if (%a% and %b%) etc.
          --[[ Indigo Rose Software Developer ]]

          Comment


          • #6
            Re: packages_selection

            One more tip:
            Here's another way to do that test.

            Just use this expression in your IF action:

            ((%box1% and 1) + (%box2% and 1) + (%box3% and 1) + (%box4% and 1)) <> 1

            Each "and 1" part causes the "TRUE" or "FALSE" value in the variable to be converted to the number "1" or "0". Then, just add those ones and zeroes together to find out how many check boxes were checked.

            You can change the "<> 1" part to match your rules for the check boxes...

            I still recommend against using check boxes for this, though...check boxes by their very nature are supposed to not be mutually exclusive. For mutual exclusivity, you should use radio buttons...

            That said, your method will work; it just might seem mildly frustrating to your users.
            --[[ Indigo Rose Software Developer ]]

            Comment


            • #7
              Re: packages_selection

              HI Lorne,
              I fully respect your professional advice.
              I tried using the radio button, but could not figure out how to.

              Here is where I had the probelm:

              SET RADIO BUTTON value=3
              Store variable in %Lang_pack% (could be anything right),
              then store that stuff in index

              %Lang_pack_index%?????????
              the trick for you and a task for me, how can construct this list.
              ---------it woked kool using sf predefined ----variables with languages----

              I have four packages,
              pack1=language_italian=%lang_it%
              pack2=Language_german=%lang_ge%
              pack3=Langauge_english=%lang_en%
              packn=Language_n=%lang_n%

              HELP: here if the radio buttons have to work, i have to assign each pack unique variable such as %lang_pack% and assign a value such a 1 for italian, and 2 for ger man and etc.

              HOW CAN I DO THAT.

              i know you have the same system for the languages like, %syslanguage%=7=english
              and%syslanguae%=9=german etc.,
              help help

              Comment


              • #8
                Re: packages_selection

                Hi Dan,

                I'm not exactly sure what you are asking here. Remember that a package is only installed if it's variable is set to TRUE. I'm not sure why you would want to assign 1 or 2 to a package’s variable.

                Basically what you would use are IF statements that would allow you to decide which Package to use.

                If your packages are ordered like this on your radio button screen:
                pack1=language_italian=%lang_it%
                pack2=Language_german=%lang_ge%
                pack3=Langauge_english=%lang_en%
                packn=Language_n=%lang_n%
                And you are storing the index in %RadioSelectionIndex%

                Try using the following actions on the AFTER tab of the Radio Button screen:

                Assign Value (%lang_it% = FALSE)
                Assign Value (%lang_ge% = FALSE)
                Assign Value (%lang_en% = FALSE)
                Assign Value (%lang_n% = FALSE)

                If (%RadioSelectionIndex% = 0)
                Assign Value (%lang_it% = TRUE)
                End IF
                If (%RadioSelectionIndex% = 1)
                Assign Value (%lang_ge% = TRUE)
                End IF
                If (%RadioSelectionIndex% = 2)
                Assign Value (%lang_en% = TRUE)
                End IF
                If (%RadioSelectionIndex% = 3)
                Assign Value (%lang_n% = TRUE)
                End IF

                mark.
                MSI Factory The Next Generation Intelligent Setup Builder

                Comment


                • #9
                  Re: packages_selection


                  I tried using the radio button, its really working kool.

                  I have one more question.

                  I am using a radio button screen for selecting languages for a multilanguage installation routine.

                  Question: How can i get the system lanague and use it as the default.

                  thanks
                  daniel

                  Comment

                  Working...
                  X