cancel
Showing results for 
Search instead for 
Did you mean: 
vishald
Pilgrim

I think that wont work

Hi henric
It is not possible to disable cancel button on the installing panel through the way suggested by Yves Kreis.
because the way Yves Kreis is saying to disable the cancel button will work only for that custom code panel
and installing panel is not shown as a panel in the installation project(as u have already seen) so u cant substitute it.

If u find any other way please let me know
0 Kudos
Yves_Kreis
Pilgrim

Re: How to disable the Cancel button

I still need to solve a problem with my installer, as soon as I am done with it I will try to get the idea I announced working and will let you know about the results... Its Java, everything can be done!

Best Regards,
Yvse
0 Kudos
Yves_Kreis
Pilgrim

Re: How to disable the Cancel button

Good morning,

Unfortunately it took me longer to test this as I thought; I had to solve important problems first. But nevertheless this one is quite easy:
a) Use a CustomCodePanel in Pre-Install and store the GUIAccess object in a static variable.
b) Use a CustomCodeAction as first action during Install step and use the enableExitButton(false) method on the previously stored GUIAccess object.

Hope this helps.

Best Regards,
Yves
0 Kudos
cristina
Pilgrim

Yes it worked!(98%)



Hi,
I was using IA7.5.
I did the following:
a) Use a CustomCodePanel in Pre-Install and store the GUIAccess object in a static variable.
b) Use a CustomCodeAction as first action during Install step and use the enableExitButton(false) method on the previously stored GUIAccess object.

It's 98% working because during the first 10-15 seconds of the Install step, where is shows:
"Installing.... Java Runtime Environment", the Cancel button is still enabled. But after that, the cancel/exit button is automatically disabled throughout the rest of the Install step.Smiley Surprised

Though in IA 2008 it's not working at all... Smiley Sad


0 Kudos
Kondalarao_n
Pilgrim

try withis code

public class PanelDisableCancel extends CustomCodeAction{

@Override
public String getInstallStatusMessage() {
// TODO Auto-generated method stub
return null;
}

@Override
public String getUninstallStatusMessage() {
// TODO Auto-generated method stub
return null;
}

@Override
public void install(InstallerProxy ruleProxy) throws InstallException {

setInstallerProxy(ruleProxy);
GUIAccess gui = (GUIAccess)ruleProxy.getService(GUIAccess.class);
System.out.println("Haiiiiiiiiiiiiiii");
System.out.println(gui);
gui.getFrame().setTitle("new title");

try{
gui.setExitButtonEnabled(false);
}catch (Exception e) {
e.printStackTrace();
}
try{
gui.setNextButtonEnabled(false);
}catch (Exception e) {
e.printStackTrace();
}
try{
gui.setPreviousButtonEnabled(false);
}catch (Exception e) {
e.printStackTrace();
}

}

@Override
public void uninstall(UninstallerProxy arg0) throws InstallException {
try {
String installDirStr = arg0.substitute("$USER_INSTALL_DIR$");
FileService fs = (FileService)arg0.getService(FileService.class);
File installDir = new File(installDirStr);
if (installDir.exists())
fs.deleteDirectory(installDirStr, false,
true);
} catch (Exception e) {
File f = new File("c:\\logUninstall5.txt");
FileOutputStream fis = null;
try{
fis = new FileOutputStream(f);
fis.write(e.getMessage().getBytes());
fis.flush();
fis.close();
}
catch (Exception e1) {
// TODO: handle exception
}
}

}
0 Kudos
vishald
Pilgrim

Re: How to disable the Cancel button

Hi Yves Kreis

Great work done

Thanks a lot it worked.
0 Kudos
Yves_Kreis
Pilgrim

Re: How to disable the Cancel button

You are welcome.

Best Regards,
Yves
0 Kudos

Question about this

Yves Kreis wrote:
Good morning,

Unfortunately it took me longer to test this as I thought; I had to solve important problems first. But nevertheless this one is quite easy:
a) Use a CustomCodePanel in Pre-Install and store the GUIAccess object in a static variable.
b) Use a CustomCodeAction as first action during Install step and use the enableExitButton(false) method on the previously stored GUIAccess object.

Hope this helps.

Best Regards,
Yves


Hello,

One thing that is confusing me on this method is how to store the GUIAccess object in a static variable at PRE-INSTALL time and access this variable at INSTALL time.

Would I create CLASS A that Extends customcodepanel and CLASS B that Extends customcodeaction?

I think the EVERY VARIABLE IS A STRING in IA methodology has confused me on as to how I'd share the GUIAccess object between two classes using IA...

Maybe it's the lack of sleep :-( heh

Thanks,

CK
0 Kudos
Yves_Kreis
Pilgrim

Re: How to disable the Cancel button

public class a extends ... {
public static GUIAccess gui = ...
...
}
public class b extends ... {
...
a.gui.enableExitButton(false);
...
}
0 Kudos

Finally had a chance to look at this (I'm a bit lost...)

Yves Kreis wrote:
public class a extends ... {
public static GUIAccess gui = ...
...
}
public class b extends ... {
...
a.gui.enableExitButton(false);
...
}


My understanding of above:

public class a extends CustomCodePanel {

CustomCodePanelProxy panelProxy = null;
public static GUIAccess gui = null;

public disableCancelDuringInstallPanel() {
}

public boolean setupUI(CustomCodePanelProxy customCodePanelProxy) {
panelProxy = customCodePanelProxy;
GUIAccess gui = (GUIAccess)customCodePanelProxy.getService(GUIAccess.class);
return false;
}

@Override
public void panelIsDisplayed() {

}

@Override
public String getTitle() {
return "Installing...";
}

@Override
public boolean okToContinue() {
return true;
}

@Override
public boolean okToGoPrevious() {
return false;
}
}

public class b extends CustomCodeAction {

private a testPanel; <-- I feel here is my issue (how can I get class b to see the GUIAccess object from class a (inited at PRE-INSTALL) :confused:

public disableCancelDuringInstallAction () {
}

@Override
public void install(InstallerProxy ip) throws InstallException {

try {
testPanel.gui.setExitButtonEnabled(false);
} catch (Exception e) {
e.printStackTrace();
}
}

@Override
public void uninstall(UninstallerProxy up) throws InstallException {
throw new UnsupportedOperationException("Not supported yet.");
}

@Override
public String getInstallStatusMessage() {
throw new UnsupportedOperationException("Not supported yet.");
}

@Override
public String getUninstallStatusMessage() {
throw new UnsupportedOperationException("Not supported yet.");
}

}

}
0 Kudos