View Full Version : cannot update progress bar

07-22-2004, 10:15 AM
I am writing ISX Universal code in the PreInstall sequence. I am using a Search File System bean that displays data from the bean's Description field (which displays in a Proress dialog it seems). I'm trying to update the Progress bar for each of the 4 Search File System beans I execute. I'm using the code below in a bean, but the Java compile fails (error is Unresolved Symbol for setPercentComplete) because I'm having difficulty figuring out which API's to use. Would appreciate some help. Thanks, Thorne

import com.installshield.wizard.*;
import com.installshield.wizard.service.AsynchronousOperation.*;
import com.installshield.event.ui.ProgressState;
import com.installshield.util.*;

public void execute(WizardAction action) {


07-22-2004, 11:11 AM
If you are using the built-in Search File System wizard action, you can make it display a progress bar by specifying the "Progress" dialog for the Search File System's "User Interface" property. You do not need to do any code.

07-22-2004, 11:34 AM
Thanks, Brian. I "kind of" lied. I had to modify the Search File System bean because it caused a Java NullPointerException when I specified "C:\" in the Search Directories property (I also wanted to log some info about the search and its results). I don't see any progress bar update code in the modified bean though. I stored the modified bean in my /classes directory and then registered it in ISX. Am I not getting progress bar updates because of my modification? Is there some way I can code the Search Directories property so it doesn't cause a runtime exception? Thorne

07-22-2004, 12:02 PM
As long as your modified action bean extends CancelableWizardAction or AsynchronousWizardAction, it should have a User Interface property when you view it in the Sequences view, and you can specify the Progress dialog for it.

07-22-2004, 12:22 PM
Thanks, Brian. I did specify Progress for the UI Interface property, but I get no progress bar updates when install runs. I do extend CancelableWizardAction. If I need to write progress bar update code, can you "throw" a few hints my way? I've been playing with the ProgressRenderer class, method updateProgress, with no good results. Thorne

07-22-2004, 01:58 PM
Take a look at the attached sample wizard action, which will control the progress renderer on the panel specified in the User Interface property.

07-23-2004, 12:15 PM
Brian, Thanks so much for the sample code. Works nicely.

How in the world might I have discovered that I needed to use RunnableWizardBeanState as the object to manipulate? I have spent hours and hours researching this progress bar topic and never read anything to indicate that's all I needed. I mean when one is starting out with IS, how does one learn which objects to manipualte given a specific objective? This is the major challenge I would like to overcome ASAP.

Thanks again for your help. Thorne

09-10-2004, 02:53 PM
UPDATE - I figured out how to make a product bean. Now my problem is that if the bean that updates the progress bar takes longer than the subsequent bean the progress bar is supposed to represent, how do I terminate the progress bar bean?

Hi Brian. Your sample works nicely for Wizard beans. Is there a similar coding example for a custom product bean? I want to move the progress bar during the Install sequence. Thanks, Thorne