Announcement

Collapse
No announcement yet.

dynamic list box continued

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • dynamic list box continued

    sup fellas, thx for creating this forum for us (altho is there any way you can put a hotlink to this forum under each category, such as under Setup Factory's category? cus i don't pay attn to the other categories as much, and i'd be inclined to think if another user is mainly working w/ SF6, then they'd do the same)

    anywho, i've created a script that when activated by sf6, returns a lump of values delimited by commas and semi-colons

    i then parse the values using SF6, temp-writing the parsed values to a .txt file to organize better, then read the txt file, parse, and display filelist in the List Box

    this works well for me, but now i'm wondering how i can have SF6 recognize and install the selected values from the list box... if i understand correctly, it stores the first file in the list as 0, the second file as 1, etc etc, recording the 0 based index in %ListBoxSelectionIndex%

    so, what would you guys suggest as a way to link up the index numbers to the urls for each file that i have available (the urls are also retrieved from the web for each file, and i'm thinking i should store them in a .txt file, and then tell the installer if ListBoxSelectionIndex has #'s 0, 1, 8, then use urls 0, 1, 8, to download/unzip/install each file

    any recommendations?

  • #2
    Re: dynamic list box continued

    That sounds like a pretty sane approach...

    Just a note we try to keep redundancy to aminimum in these forums so that they stay us uncluttered as possible. I guess we'll just have to keep mentioning it lots in all the forums so people will know.

    Although I'm not sure I understand your needs, personally when I need to retrieve and use info from a remote database with an app I tend to do everything on the server side with PHP. So let's say I wanted to retrieve some data from a database and use it to create a set of links in AMS, I would create a PHP file which retrieved the results and then placed them into a tab delimited string which I would then send back to my application.

    Once I have that data I can do anything with it. If I need to use that data more than once I will have my application use a loop to place the results into slots of a global list, if I only need to use it once then I simply use it and forget it directly from the variable.

    So let's say I had a "this week's links" feature which grabbed my weekly link list from my web site and added it to a client application at runtime. I would format and return those results with PHP as such:

    1;News Stories;http://www.mynewslink.com;2;Recipes;...link.com;3;Fun Stuff;http://www.myfunlink.com;4;Resources...ourcelink.com;

    From there it is a very simple matter to construct a list or menu with links. Obviously this concept can be scaled up or down as per your needs. Not sure if that helped, just sharing my approach.

    Just a note too, whenever you have a server call use a server side script to do your data formatting and your client app to do the display formatting. It's a heck of a lot easier to change a line in your PHP script when your data changes than it is to go back and rebuild your entire app. And it's way easier to add and test display functions from within your app than it is from the server side.

    Also it's good idea to create a standard convention for yourself so that all your apps process data in the exact same way, if you maintain consitency in your practices it's a lot easier to come back and deal with your apps later or even to do things like standardize functions for all your deployed apps with a single server side script, i..e you can create one script full of functions such as database queries, etc. and use it for every single app you ever build. You obviously understand functions so that should be a no-brainer for you. [img]/ubbthreads/images/icons/smile.gif[/img]

    Enough rant.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: dynamic list box continued

      sorry corey, i only posted here since you mentioned it in the other thread, and it seemed to me that the new question was different enough to warrant me placing this thread here

      if you'd prefer to move my question back to the other thread, then feel free, i don't mind, just thought this is where you wanted me to post

      Comment


      • #4
        Re: dynamic list box continued

        No this is fine, use this forum lots, it's here for you. [img]/ubbthreads/images/icons/smile.gif[/img] The redundancy comment wasn't about your post, it was about your request for multiple hot-links to this forum. [img]/ubbthreads/images/icons/smile.gif[/img] The purpose of this forum is to be able to post a question or project need and then receive ongoing support for that thread over period of days or even weeks, even as the original question morphs into other questions. So go hard, go often, and may the force be with you...

        I wanted you guys to have a place to get answers to difficult questions, and I also want to make sure you guys are all understanding the broader concepts behind the answers you receive, i.e. Give a man a fish and he eats today, teach a man to fish and he eats forever...

        That's also why sometimes you'll notice me trying to prod people into experimenting and doing things for themselevs rather than just giving out simple step-by-step directions. It's a judgement call but my motives are pure. [img]/ubbthreads/images/icons/smile.gif[/img] If you have a deadline I always help meet it but most often I prefer to see people try things before asking them, i.e. it makes no sense to ask something in the forum that only takes 5 minutes to try and test at home...

        I believe that the broader design concepts behind our apps are consistent even across other platforms such as Flash and Dreamweaver, so in my own little idealist corner I am trying to help myself and others to become better overall designers as well as getting their projects out on time. I see this as being the best long term way for us to create a healthy community around our products and attract more people to the fold. Sure there are easier ways to create the illusion of a healthy community but we're into substance more than appearances here. [img]/ubbthreads/images/icons/smile.gif[/img]

        That being said I have no time for the next week or two due to my move so if you don't see me around much be patient, I'll be back with a vengeance faster than you can say, "Justin Timberlake sucks goat butt".

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment


        • #5
          Re: dynamic list box continued

          lolol, cool beans, thx for the clarification corey, and good luck w/ that move, i know they can be a pain (i DO know, i helped move 3 diff friends and a relative in the past 6 months, agh)

          Comment


          • #6
            Re: dynamic list box continued

            We just got almost 2 feet of snow in the past 10 days and it's -23 C outside right now. [img]/ubbthreads/images/icons/smile.gif[/img]

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment


            • #7
              Re: dynamic list box continued

              haha, that would be horrible

              luckily when i had to move those people, it was either in late fall, or in the winter RIGHT before the snow hit (left the last person's house, and snow started falling, haha)

              anyway, corey, i was able to script some WHILE commands to determine the URLS for each file, so now everything is going good, except one thing is bugging me...

              when the installer is parsing/writing, it repeats it's action to the user (says Parsing file, Writing file) or something like that, but i'd prefer it to stay silent concerning what it shows to the user... if it's possible, is there any way to set the message that the user sees while the installer is working??

              Comment


              • #8
                Re: dynamic list box continued

                also, i thought i saw somewhere in the forums howto addup the filesize... one of the variables my installer retrieves from the web is %size% in bytes, how would i reflect that size into the total download size? (have the size for each file aggregate into the final total?)

                Comment


                • #9
                  Re: dynamic list box continued

                  All the best with your move.
                  We've (in the UK) just had about an inch of snow (its about -0.5c) and the whole country has ground to a halt.
                  Its always such a suprise to us when it snows in winter ...

                  Comment


                  • #10
                    Re: dynamic list box continued

                    All of the messages used in Setup Factory are contained in the Language modules. If you go to the Languages tab in Design->General Design, double click the English module to view it's properties. You will then see all of the message IDs and their corresponding text used in Setup Factory. What you could do is assign new text to any of those message ID's using an Assign Value action during your install. Give that a try.

                    Hope that helps.

                    Comment


                    • #11
                      Re: dynamic list box continued

                      There is a built-in variable in Setup Factory for this purpose. The following was copied from the ReadMe file:

                      Added the variable %AdditionalDiskSpace% which represents additional disk space (in bytes) that will be added to the required diskspace calculation displayed on the Select Install Folder Screen. This variable can be set to either a positive or negative number.

                      Hope that helps.

                      Comment


                      • #12
                        Re: dynamic list box continued

                        thx darryl, but i found that Additional Disk Space variable awhile back, and i tried to add the values in, but it wouldn't display right, but i'll try it again (cus i found a few errors in my code since then, so that's most likely the reason for the display error)

                        Comment

                        Working...
                        X