Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863

    Find the fault and win a $100

    Seriously...
    here's the deal: I have a long time client that is reporting that my code is 'storing the results'. I cannot see a problem with the code. So, enter my post; find "the fault" and I'll pay you $100. (yes, United States dollars)

    Here's the background.
    If any of a "certain set" of files is missing from a specific folder, the install should report what file(s) are missing, and then refuse to continue.

    My client reported that a file (SYS_FUN_03_SQLTABS_.003) was missing. He copied the file to the proper directory, and re-ran the install; but the install still reported the file as missing.

    Here is the code from a listbox screen's "on preload"

    Code:
    local tFiles = {"Actions.003","AdMEN.003","Admin.003","AdREP.003","BioCHECK.003","Classes.003","DAL.003","Guardian.003","IMPORT.003","Join.003","LAPrint.003","Purpose.003","SchCkIN.003","SORHits.003","Students.003","SYS_FUN_02_SQLINP_.003","SYS_FUN_03_SQLTABS_.003" ,"Teachers.003","Vendor.003","Voluntrs.003"};
    local x;
    
    StatusDlg.Show();
    StatusDlg.SetTitle(SessionVar.Expand("%ProductName%"))
    StatusDlg.SetMessage("Please wait...")
    StatusDlg.ShowProgressMeter(true);
    StatusDlg.SetMeterRange(0,Table.Count(tFiles) )
    
    for x=1,Table.Count(tFiles) do 
    	local cFile = _ProgramFilesFolder.."\\SchCkIn\\"..tFiles[x];
      StatusDlg.SetMeterPos(x);
      StatusDlg.SetStatusText(tFiles[x])
      if not File.DoesExist(cFile) then
    		DlgListBox.AddItem(CTRL_LIST_BOX, tFiles[x]);
      end
    end
    StatusDlg.Hide();
    
    if DlgListBox.GetCount(CTRL_LIST_BOX) < 1 then
      Screen.Skip();
    end
    Any other errors, than a reason why it would report this file (and only this one file) as "still missing" will not win the $100 -- but will spank me into feeling pathetic and miserable.

    -josh

    PS: Only the 1st "fault finding" post will get the $ -- so don't just copy someone's answer thinking I'm gonna pay out over and over ;-)
    Last edited by jassing; 10-01-2009 at 05:10 PM.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  2. #2
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    I have to ask... the string "SYS_FUN_03_SQLTABS_.003" is not, by any chance, defined as a default item of the List Box in the screen properties? I don't see you cleaning the List Box explicitly, so it would show something that was defined in the properties.

    What does Screen.Skip() do? Is this just another name for Screen.Next() or does it use the List Box in some way?

    A look at the project file would certainly help...

  3. #3
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Quote Originally Posted by Ulrich View Post
    I have to ask... the string "SYS_FUN_03_SQLTABS_.003" is not, by any chance, defined as a default item of the List Box in the screen properties?
    EXCELLENT guess, but no, the screen list item is empty on entry.

    [QUOTE=Ulrich;144341]I don't see you cleaning the List Box explicitly, so it would show something that was defined in the properties.

    Good idea, but the box is empty to begin with. There is no choice but to cancel the install if the user ends up on this screen. That was my 1st thought -- that they installed, got the screen, dropped the file in place, clicked "back" and "next" to "reload" the screen -- but they can't -- as back is disabled...

    Quote Originally Posted by Ulrich View Post
    What does Screen.Skip() do? Is this just another name for Screen.Next() or does it use the List Box in some way?
    Screen.Skip() "skips" that screen and goes to the next one -- kind of like .Next only it works both ways (forward/back) Solves a problem that I think those that moved from sf6 forward felt was more of an issue.

    See this post.

    Quote Originally Posted by Ulrich View Post
    A look at the project file would certainly help...
    If you want it; it's ugly. But that's the sum total of the code for that screen. the rest of the project will just muddy the waters.


    FWIW: Here's my copy of "ConditionalScreens.lua" (Maybe someone will make it into a plugin and claim it as their own work;-))

    Code:
    -- Laslie Toth
    -- SF7 forums: http://www.indigorose.com/forums/showpost.php?p=83461&postcount=4
    -- expand the screen table with direction tag
    Screen.Direction = 1;
    
    -- my back screen function
    function Screen.GoBack()
    	-- go to back screen
    	Screen.Direction = -1;
    	Screen.Back();
    end
    
    -- my next screen function
    function Screen.GoNext()
    	-- go to next screen
    	Screen.Direction = 1;
    	Screen.Next();
    end
    
    -- skip screen function
    function Screen.Skip()
    	if Screen.Direction < 0 then
    		Screen.GoBack();
    	elseif Screen.Direction > 0 then
    		Screen.GoNext();
    	end
    end
    Last edited by jassing; 10-01-2009 at 06:51 PM. Reason: Added conditionalscreens.lua


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  4. #4
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Thanks to all (8) for looking, and to Ulrich for playing along. Sadly, today we have no winner.

    2 days into this problem, and countless back and forths, and just a notch south of calling me a liar ("You must be storing the results"), turns out my client did not give me the proper file names. the file name is actually
    "SYS_FUN_03_SQLTABS_ .003"
    or for the font challenged: "SYS_FUN_03_SQLTABS_<SPACE>.003"

    This was actually a good experiment... This could save me countless hours in the future, I may re-initiate a similar game..

    -josh


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts