PDA

View Full Version : Progress Bars screen, On Start code is skipped


AxemanMK
09-20-2006, 11:21 AM
This problem is very difficult to describe, but I'll do my best.

I am using SF7, with all the latest updates.

I have a project to install our software, which creates the uninstaller, and another project that simply updates our software over the top.

The problem I have is with the update project....

On the "After Installing" section, I have a series of Double Progress Bars screens that perform task after task. Everything worked beautifully untill I added 2 more similar screens to copy some additional files from server back to client. These screens are in positions 16 and 17 of a total of 21 screens.

The first of the 2 new screens seemed to be getting skipped at runtime, but the second screen would perform its "copy" task as required.

I double and triple checked all of my IF statements to ensure that I wasn't actually skipping the screen by design, and indeed I wasn't.

I decided to add screen debugs to every screen in the project that simply displayed a dialogue message to tell me which screen I was on. Code Below..

--------------------------------------------------------------------------
--Per Screen Debug.
if TurnOnScreenDebugs == true then

tblScreenProperties = Screen.GetProperties();

Dialog.Message("At Screen", tblScreenProperties.ScreenName.." - On Start", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

end
--------------------------------------------------------------------------

The above code I added to "On Preload", "On Next", "On Start" where appropriate, so I could see at which point of each screen I was getting to.

On the screen in question, the above code was the ONLY code on the "On Preload" section.

Now... The problem was, that the 16th screen would ALWAYS skip any code that was in the "On Start" section.

I proved this by deleting all code within the "On Start" section, except for my screen debug above.

When I ran the project, I had the dialogue message telling me that it had reached the 16th screen and was at the "On Preload" section, but would NEVER give me the dialogue message telling me that it was at the "On Start" section.

So as you can see, I was indeed reaching the screen itself and not skipping it, and yet the "On Start" section would always be skipped !

This drove me insane for 2 days !

I have created a work around by simply adding a progress bars screen at the 16th position, labelled "Dummy Skip Screen" that does absolutely nothing. Again, using the screen debugs, the "On Start" section of the dummy screen is STILL being skipped, but as the screen does nothing, its not a problem. Consequently, both of my actual screens perform their tasks beautifully, AFTER the dummy screen.

I know this sounds crazy.. But its true.

Reading some of the forums, I decided to disable my AV software and recompile, but the behaviour remained.

Has anyone heard of such a thing ???

Many thanks.... Andy

Adam
09-20-2006, 11:29 AM
That does sound weird.

- Before you added the 'dummy' screen did the "On Finish" event fire for the screen that was giving you issues?

The progress bars screen will skip if there are no actions in the "On Start" or "On Finish" tabs.

Adam Kapilik

AxemanMK
09-20-2006, 12:40 PM
Hi Adam.

Thanks for your prompt reply.

This is where it get even weirder !!

To begin with, the screen is simply a duplicate of many other screens that I already use. I just simply changed the source and destination variables, plus the obvious message text.

The "On Start" had all the code I would expect, and the "On Finish" tab had the default code of..

------------
-- These actions are performed right after the On Start actions.

-- advance to the next screen
Screen.Next();
------------

So to answer you question properly, I've taken the dummy screen out, and simply added....

--------
Dialog.Message("Problem", "Screen 16, on Finish", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
--------

So now the "On Finish" tab looks like this...

--------
-- These actions are performed right after the On Start actions.

Dialog.Message("Problem", "Screen 16, on Finish", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

-- advance to the next screen
Screen.Next();
--------

Now when I run it, with screen debugs OFF.... screen 16 actually performs its actions, but appears to go "background".. IE: the title bar is slightly greyed.
Once the copy actions are complete, I get the "Screen 16, on Finish" dialogue displayed.... GREAT so far !!!

BUT.............

When I click OK to the "Screen 16, on Finish", screen 17 is fired and performs its actions as expected, screen 18 meets the correct conditions and is skipped as expected, but I then get my "Screen 16, on Finish" dialogue message displayed again, just as screen 19 is displayed. !! When I click OK to this, screen 19 is skipped and I end up at the last screen !!

This is making less and less sence as it goes on...

Essentially, by adding a Dialog.Message to the "On Finish" tab, the behaviour becomes even stranger.

At this point, I have edited the .sf7 file in notepad and searched for "Screen 16, on Finish", and indeed this appears only once within the XML.

Its now far too late in the evening to even be able to see straight, so a coffee and a journey home is definately required........ :)

Many thanks.... Andy

Adam
09-20-2006, 12:58 PM
What version are you running from Help -> About?

Have a good sleep. If you would like me to take a peek at the project file for any possible issues you could open a Support Ticket (http://support.indigorose.com).

Adam Kapilik

AxemanMK
09-21-2006, 05:15 AM
Version is --> 7.0.5.1

I think I might take up your offer to take a look if you wouldn't mind. Although I have found a workaround, I'm a little worried that the routine might misbehave on some machines. I have tested this on several machines / OS's and the odd behaviour is constant.

Assumably, I open a support ticket and then email you the .sf7 project file ?

Regards... Andy

Adam
09-21-2006, 10:22 AM
You can attach the project file to the support ticket. Also include the version that you are using and your serial number.

Adam Kapilik

AxemanMK
09-21-2006, 11:39 AM
Cool. Many thanks Adam.

I have a long weekend ahead of me, and every reason to not think about this for the next 4 days, so you can expect to hear from me Tuesday....:)

Thanks again......... Have a good weekend.... Andy

Adam
09-21-2006, 03:15 PM
Long weekends are the best kind of weekends.

Take'r easy

Adam.