This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- progress bar..
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2006
03:17 PM
How do I get getISHtmlControl , getISFrame(), getISPanel() from a WizardBeanEvent eve
How do I get getISHtmlControl , getISFrame(), getISPanel() from a WizardBeanEvent event
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2006
04:58 PM
pironio wrote:
How do I get getISHtmlControl , getISFrame(), getISPanel() from a WizardBeanEvent event
What type of event? Are you in the panel source when you are trying to do this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 18, 2006
05:48 AM
I AM HERE...
public class MyAction extends CancelableWizardAction {
public void execute(WizardBeanEvent event) {
RunnableWizardBeanState progress = this.getState();
int seconds = 5;
boolean completed=false;
// Update the progress bar every 1/10 second
int workUnits = seconds * 10;
final long sleepDuration = 100; // milliseconds
// reset the progress bar of the calling wizard action to 0%
progress.setPercentComplete(0);
try {
for (int i=1; i<=workUnits; i++) {
Thread.sleep(sleepDuration);
progress.setStatusDetail("Completed "+i+" of "+workUnits);
progress.setPercentComplete(100*i/workUnits);
while (progress.isSuspended()) {
// User clicked Cancel button, waiting for them to confirm
if (progress.isCanceled()) {
return; // Show next panel, do not exit wizard completely.
.......... THIS IS WHAT I NEED TO DO TO UPDATE THE HTML PANEL
ISPanel panel = event......getISPanel();
ISHtmlControl html = panel.getISHtmlControl("SystemStatusPreChecking_MachineStatus_Var");
html.setContentType(ISHtmlControl.HTML_CONTENT_TYPE);
StringBuffer sb = new StringBuffer();
............
html.setText(sb.toString());
}
public class MyAction extends CancelableWizardAction {
public void execute(WizardBeanEvent event) {
RunnableWizardBeanState progress = this.getState();
int seconds = 5;
boolean completed=false;
// Update the progress bar every 1/10 second
int workUnits = seconds * 10;
final long sleepDuration = 100; // milliseconds
// reset the progress bar of the calling wizard action to 0%
progress.setPercentComplete(0);
try {
for (int i=1; i<=workUnits; i++) {
Thread.sleep(sleepDuration);
progress.setStatusDetail("Completed "+i+" of "+workUnits);
progress.setPercentComplete(100*i/workUnits);
while (progress.isSuspended()) {
// User clicked Cancel button, waiting for them to confirm
if (progress.isCanceled()) {
return; // Show next panel, do not exit wizard completely.
.......... THIS IS WHAT I NEED TO DO TO UPDATE THE HTML PANEL
ISPanel panel = event......getISPanel();
ISHtmlControl html = panel.getISHtmlControl("SystemStatusPreChecking_MachineStatus_Var");
html.setContentType(ISHtmlControl.HTML_CONTENT_TYPE);
StringBuffer sb = new StringBuffer();
............
html.setText(sb.toString());
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 18, 2006
12:24 PM
Unfortunately, I do not think that the WizardBeanEvent class will be able to get you to the getISPanel() method.
If you were writing this as a panel and you had access to the panel event methods you would have no problem. Why did you choose to do this as a WizardBeanEvent when you are showing a panel with a progress bar?
If you were writing this as a panel and you had access to the panel event methods you would have no problem. Why did you choose to do this as a WizardBeanEvent when you are showing a panel with a progress bar?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 18, 2006
12:50 PM
OK, I have a panel that works fine...when post status .only....
.. the problem is when I try to add a progress bar to that panel... the only way I know how to add a custom progress bar is by having the action I show you in previous posts....
public class ProgressBarAction extends AsynchronousWizardAction //CancelableWizardAction
{
I don't know how to add a customized progress bar inside the panel without a wizard action .... Is that possible? ....when I have a panel like this....
public class PanelSystemStatusPreChecking extends Thread
{
private com.installshield.event.ui.ISDialogContext context=null;
public void initializeUISystemStatusPreChecking(com.installshield.event.ui.ISDialogContext context)
{
end initializeUISystemStatusPreChecking
public void queryEnterSystemStatusPreChecking(com.installshield.event.ISQueryContext context)
{
}
public void enteredSystemStatusPreChecking(com.installshield.event.ui.ISDialogContext context)
{
try
{
if (context.getServices().getISDatabase().getVariableValue("AllFrames_LastButtonClicked").equals("next"))
{
ISFrame frame = context.getISFrame();
ISButton nextButton = frame.getButton("next");
//disable the next button
nextButton.setEnabled(true);
this.context=context;
ISButton backButton = frame.getButton("back");
backButton.setEnabled(true);
ISButton cancelButton = frame.getButton("cancel");
cancelButton.setEnabled(true);
//start thread
this.run();
}//end enteredSystemStatusPreChecking
public void run()
{
context.logEvent(this, Log.DBG, "run-Entry.");
try
{
//get status from the controller
updateMessage(controllerInstance.getControllerStatus());
//----- wait for all machines to finish...
//get status from the controller
updateMessage(controllerInstance.getControllerStatus());
......
.. the problem is when I try to add a progress bar to that panel... the only way I know how to add a custom progress bar is by having the action I show you in previous posts....
public class ProgressBarAction extends AsynchronousWizardAction //CancelableWizardAction
{
I don't know how to add a customized progress bar inside the panel without a wizard action .... Is that possible? ....when I have a panel like this....
public class PanelSystemStatusPreChecking extends Thread
{
private com.installshield.event.ui.ISDialogContext context=null;
public void initializeUISystemStatusPreChecking(com.installshield.event.ui.ISDialogContext context)
{
end initializeUISystemStatusPreChecking
public void queryEnterSystemStatusPreChecking(com.installshield.event.ISQueryContext context)
{
}
public void enteredSystemStatusPreChecking(com.installshield.event.ui.ISDialogContext context)
{
try
{
if (context.getServices().getISDatabase().getVariableValue("AllFrames_LastButtonClicked").equals("next"))
{
ISFrame frame = context.getISFrame();
ISButton nextButton = frame.getButton("next");
//disable the next button
nextButton.setEnabled(true);
this.context=context;
ISButton backButton = frame.getButton("back");
backButton.setEnabled(true);
ISButton cancelButton = frame.getButton("cancel");
cancelButton.setEnabled(true);
//start thread
this.run();
}//end enteredSystemStatusPreChecking
public void run()
{
context.logEvent(this, Log.DBG, "run-Entry.");
try
{
//get status from the controller
updateMessage(controllerInstance.getControllerStatus());
//----- wait for all machines to finish...
//get status from the controller
updateMessage(controllerInstance.getControllerStatus());
......
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 18, 2006
02:25 PM
If you have things encapsulated inside a panel then it should be simple to grab the control IDs for the controls you need to access.
For example, this code would get you the handle for the control of a text field. (TEXT_CTRL_ID would be defined as whatever your actual control ID is)
Once you grab the control ID, there are a whole lot of things you can do with it.
For example, this code would get you the handle for the control of a text field. (TEXT_CTRL_ID would be defined as whatever your actual control ID is)
ISTextField textfieldCtrl = (ISTextField)context.getISPanel().getControl(TEXT_CTRL_ID);
Once you grab the control ID, there are a whole lot of things you can do with it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 19, 2006
05:44 AM
Yes, I have all that under control I can get getISFrame(), getISPanel() in the panel.... MY problem is How do I do a custom progress bar from within the panel..
progress.setStatusDetail("Completed "+i+" of "+workUnits);
progress.setPercentComplete(100*i/workUnits);
Having two threads,
public class MyAction extends CancelableWizardAction {
and ....
public class PanelSystemStatusPreChecking extends Thread
don't work, so if I have everything under panel control.. how do I set
progress.setPercentComplete(... ) from the run method in the panel?
progress.setStatusDetail("Completed "+i+" of "+workUnits);
progress.setPercentComplete(100*i/workUnits);
Having two threads,
public class MyAction extends CancelableWizardAction {
and ....
public class PanelSystemStatusPreChecking extends Thread
don't work, so if I have everything under panel control.. how do I set
progress.setPercentComplete(... ) from the run method in the panel?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 19, 2006
01:22 PM
Ok I see what you are getting at. The built in progress controls dont seem to work the same way as the other controls in the panel. I basically abandoned using them in custom panels because I couldn't do what you are trying to do.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 19, 2006
01:40 PM
K, thanks for your quick response..
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)