Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Loop Wizard Behavior Clarification

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Loop Wizard Behavior Clarification

    Friedrich,

    Can you explain why in a script with no explicit Break Loop or Cycle Loop a
    Message Box statement placed as the last script item before the Loop Wizard
    End will not display until the last dialog (Ready to Install) is accepted?

    That specific behavior is a trivial, and in itself unimportant, example of
    the seemingly mysterious behavior of the Loop Wizard. I realize I'm new to SB
    and could certainly be seriously lacking a clue, but my expectation of a loop
    construct and SB's documentation both lead me to believe that absent an
    explicit control statement code will execute from loop entry (after Handle
    Wizard Events) through to the loop's End. The trivial example seems to
    indicate otherwise.

    A more meaningful issue for me is a case where a block of code executes based
    on the state of % SB DIALOGID% and a variable set in an include. For no
    reason other the way I think, I positioned that block near the end of the
    loop after the included code was executed. That worked fine until I made a
    change (I have no idea now what that change was) that caused the required
    condition of the combination of % SB DIALOGID% and the variable to always
    fail. Repositioning that code block to just After Handle Wizard Events
    changed that behavior.

    So moving a block of code fixed the unexpected behaviors, leaving me happy
    and with absolutely understanding of why. The behavior I am seeing leads me
    to conclude that there are conditions that create an implicit Cycle. If that
    can happen, we really need to know about it. Perhaps I don't understand the
    behavior of % SB DIALOGID%, although it seems simple enough. Maybe I'm
    overlooking something else I don't understand.

    My biggest issue is I am reluctant to release this beast into the wild when I
    have such a superficial comprehension of its behaviors. Have any spare clues?

    --
    Best regards,

    Mark

    -------------------------------------------------------------------
    Why waste time learning when ignorance is instantaneous?
    We do email right!
    Rock solid hosting services at http://www.lanbytes.net

  2. #2

    Default Re: Loop Wizard Behavior Clarification

    Mark,

    Could you please send me a short script example? Do you have anything else
    in the Wizard Loop structure?

    Thanks,
    Friedrich

    --
    Friedrich Linder
    CEO, Lindersoft
    www.lindersoft.com
    1.954.252.3910

  3. #3

    Default Re: Loop Wizard Behavior Clarification

    >Could you please send me a short script example? Do you have anything else
    >in the Wizard Loop structure?

    Friedrich,

    I can't force the behavior in a trivial script. I have a feeling this is not
    something that is going to be reproducible outside my own work.

    There is a fairly large amount of code within the Wizard Loop. The loop
    itself is close to 300 lines (including white space), and there are seven
    include instances in there that execute conditionally. So it's something of a
    beast.

    As I said before, there's likely something there that I do not understand.
    IOW, I fully expect that I am doing something that causes in the behavior,
    thus my desire to better understand the workings of the Wizard Loop. Again, I
    am expecting a top to bottom execution of code, but I am seeing cases where
    that is definitely not its behavior.

    So absent Break Loop or Cycle Loop how can I create a condition that caused
    the Message Box to behave as I described? If that can't, or shouldn't,
    happen, then I'll go back and try to create an example for you. I just have
    the sneaking suspicion that I'm doing something dumb.

    --
    Best regards,

    Mark

    -------------------------------------------------------------------
    Why waste time learning when ignorance is instantaneous?
    We do email right!
    Rock solid hosting services at http://www.lanbytes.net

  4. #4

    Default Re: Loop Wizard Behavior Clarification

    Mark,

    Would it be possible to send me the script(s)?

    In our latest internal source codes, I have removed the "Handle Wizard
    Event" macro (the Loop Wizard function handles this now). But in the
    current version, the "Handle Wizard Event" macro leaves the Wizard Loop
    structure if %_SBDIALOGID% > %_SB_DIALOGMAX.

    For example, the following code:

    ! Wizard dialog definition(s)
    Define Wizard Dialog "#1" (Welcome)
    Define Wizard Dialog "#2" (Select Install Folder)
    Define Wizard Dialog "#3" (Ready to Install)

    ! The Wizard Loop displays the dialog screens that the user sees in the
    installation
    Loop Wizard
    Handle Wizard Events()
    Message Box "test" -- "test"
    End

    1. Loop Wizard display the Welcome (#1) dialog
    2. Click Next and Handle Wizard Events() checks if %_SBDIALOGID% >
    %_SB_DIALOGMAX
    3. Display test mesage box
    4. %_SBDIALOGID% increased by 1
    5. Loop Wizard display the Select Install Folder (#2) dialog
    6. Click Next and Handle Wizard Events() checks if %_SBDIALOGID% >
    %_SB_DIALOGMAX
    7. Display test mesage box
    8. %_SBDIALOGID% increased by 1
    9. Loop Wizard display the Ready to Install (#3) dialog
    10. Click Next and Handle Wizard Events() checks if %_SBDIALOGID% >
    %_SB_DIALOGMAX
    11. Break Loop Wizard (no message box displayed)

    Friedrich

    --
    Friedrich Linder
    CEO, Lindersoft
    www.lindersoft.com
    1.954.252.3910

  5. #5

    Default Re: Loop Wizard Behavior Clarification

    >Would it be possible to send me the script(s)?

    Sure, but I feel a bit guilty about dumping that mess on you.

    >In our latest internal source codes, I have removed the "Handle Wizard
    >Event" macro (the Loop Wizard function handles this now). But in the
    >current version, the "Handle Wizard Event" macro leaves the Wizard Loop
    >structure if % SBDIALOGID% > % SB DIALOGMAX.

    I'm not seeing a premature exit from the Wizard Loop. I do have six of 14
    dialogs that are set to hide before entering the loop, then conditionally set
    to show/hide. Maybe something there is at play.

    >For example, the following code:

    Thanks for that explanation.

    I'll email the scripts to you.

    --
    Best regards,

    Mark

    -------------------------------------------------------------------
    Why waste time learning when ignorance is instantaneous?
    We do email right!
    Rock solid hosting services at http://www.lanbytes.net

  6. #6

    Default Re: Loop Wizard Behavior Clarification

    Mark,

    What a monster script <bg>.

    I'll try to run it through the debugger and get back to you.

    Thanks,
    Friedrich

    --
    Friedrich Linder
    CEO, Lindersoft
    www.lindersoft.com
    1.954.252.3910

  7. #7

    Default Re: Loop Wizard Behavior Clarification

    >What a monster script <bg>.

    Yeah, it's a PITA. I sometimes feel I work to hard to make life simple for
    all those folks with years old product releases. The upside is you get to
    throw a big bowl of spaghetti at SB. :}

    --
    Best regards,

    Mark

    -------------------------------------------------------------------
    Why waste time learning when ignorance is instantaneous?
    We do email right!
    Rock solid hosting services at http://www.lanbytes.net

  8. #8

    Default Re: Loop Wizard Behavior Clarification

    Mark,



    First of all, let me tell you I am impressed!! This is a very fine piece of
    SB5 script. You made my day.

    The problem is caused by rsc_OFPro.GetDBPath.v8.AndPrior.sbi. The End
    statement at line #101 should result in a "Too many end blocks" error
    message - but the compiler generates an internal overflow and so this error
    is not detected :-( It is fixed now, thank you.

    Please remove line 101 in rsc_OFPro.GetDBPath.v8.AndPrior.sbi and it should
    work fine.

    BTW, I found another potential problem (I am working on this now).

    Thanks,
    Friedrich

    Friedrich Linder
    CEO, Lindersoft
    www.lindersoft.com
    1.954.252.3910

  9. #9

    Default Re: Loop Wizard Behavior Clarification

    Mark,

    Please ignore my note with regards to another potential problem. I saw in
    the debugger that the code in rsc_CheckForActiveProgram.sbi was executed
    three times. I did not notice the calls from line 194, 198 and 207 (I was
    afraid "Loop 3 Times" was broken). I need to pay more attention or get
    better coffee. <bg>

    Friedrich

    --
    Friedrich Linder
    CEO, Lindersoft
    www.lindersoft.com
    1.954.252.3910

  10. #10

    Default Re: Loop Wizard Behavior Clarification

    >First of all, let me tell you I am impressed!! This is a very fine piece of
    >SB5 script. You made my day.

    Thanks so much, Friedrich. I was concerned you'd see that mess and yell at me
    for abusing your product. :}

    >The problem is caused by rsc OFPro.GetDBPath.v8.AndPrior.sbi. The End
    >statement at line #101 should result in a "Too many end blocks" error
    >message - but the compiler generates an internal overflow and so this error
    >is not detected :-( It is fixed now, thank you.

    Well, I'll be... No way I would have found that.

    >Please remove line 101 in rsc OFPro.GetDBPath.v8.AndPrior.sbi and it should
    >work fine.

    Zapped. Thanks again for the help!

    --
    Best regards,

    Mark

    -------------------------------------------------------------------
    Why waste time learning when ignorance is instantaneous?
    We do email right!
    Rock solid hosting services at http://www.lanbytes.net

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Return to Wizard loop
    By timbojones in forum SetupBuilder
    Replies: 3
    Last Post: 08-10-2006, 07:35 PM
  2. Breaking within Wizard Loop
    By Joe Snyder in forum SetupBuilder
    Replies: 7
    Last Post: 01-04-2006, 06:50 AM
  3. More Minor Issues
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 2
    Last Post: 06-26-2005, 08:50 AM
  4. Define Wizard Dialog ideas
    By sphair in forum SetupBuilder
    Replies: 2
    Last Post: 10-29-2004, 04:01 AM
  5. Do something during a Loop Wizard
    By gspillane in forum SetupBuilder
    Replies: 2
    Last Post: 10-13-2004, 06:39 AM

Posting Permissions

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