PDA

View Full Version : How to provide user with list of packages to be installed?


Siganid
02-02-2003, 05:17 AM
I want to provide the user with a list of the packages they have chosen to install. I want it to form part of the "Ready to Install Screen" so they can hit Back if they've made a mistake. Any suggestions?

intel352
02-02-2003, 08:08 AM
dunno any way to blend it into the Ready to Install screen, but could try a list box screen, populate it w/ their choices, and ask if this is correct, if not then press Back

that might work... it'd be nifty if there was a way to disable user clicking inside the listbox... (dunno, there might be)

but anywho, that's just a suggestion...

Siganid
02-02-2003, 08:17 PM
Well, I've sort of found a couple of ways to do this, the first involves writing the list of "TRUE" packages to a text file in %TempDir% then assigning its contents to a variable, the second way assigns text to variables for those package variables that are set to TRUE then displays all of them. Neither way is a perfect solution. How I wish SUF supported array-type variables!

But your suggestion has provided another possibility. Perhaps a ListBox screen is a better way of getting the user to select packages because it allows you to "Store text of selected item(s) in variable:". Then maybe I could use it to set the package variable(s) to TRUE as well as display the user's choices. Cool! I shall check it out now...Thanks intel352!

intel352
02-02-2003, 08:39 PM
yeah, the listbox rules

i'm currently using it for my live-download capability (SF6 fetches a current list of available downloads, then i list the available downloads in the listbox)

it's very handy, and prolly useful for alot of functions... if you need any help working w/ your installer, lemme know, i can help you out w/ whatever i know =-) (and the devs Darryl and Corey are very helpful as well)

Darryl
02-03-2003, 10:12 AM
Just a few comments from the discussion in this thread. It is possible to disable the ListBox. You can find a checkbox labeled "Enable list box" on the Custom tab of that screen.

The List Box screen does allow you to populate the list through a delimited string that you can generate at runtime. So you can certainly use it in a dynamic nature.

Using delimited strings, it's functionality is very similar to an array. Using some of the String actions they can be accessed through zero based indexes.

Definitely take a close look at that screen. I believe that intel352's suggestion is a very good one.

Siganid
02-04-2003, 06:14 AM
Yea, thanks guys but I decided to revert to using a "Select Packages" screen because I've completely solved my problem now, and its elegant too! /ubbthreads/images/icons/smile.gif

I discovered this because I needed to create a counter variable for a WHILE loop so I could use the aforementioned "List Box" screen to select packages. However, serendipity struck and I noticed that you can keep packing values into the same variable using the following syntax:

%InstallPacks% = %InstallPacks%[delimiter][NextPack]

Simple but achieves exactly what I want. All I had to do was use a few IFs and a carriage return as the delimiter and I got a perfectly formed list of all packages set to TRUE prior to install, in a single variable. I then put that into the "Ready to Install" screen and I'm a happy little camper! /ubbthreads/images/icons/smile.gif No more writing/reading to temp. files!

intel352
02-04-2003, 11:14 AM
ooh, that sounds nice, good job (heh, i might haveta keep that idea in mind)