Community Forums
Page 4 of 8 FirstFirst ... 23456 ... LastLast
Results 16 to 20 of 39

Thread: How to disable the Cancel button

  1. #16
    Join Date
    Oct 2007
    Posts
    8

    Talking

    Hi Yves Kreis

    Great work done

    Thanks a lot it worked.

  2. #17
    Join Date
    Jul 2007
    Location
    Luxembourg
    Posts
    143
    You are welcome.

    Best Regards,
    Yves

  3. #18
    Join Date
    Jul 2007
    Posts
    55

    Talking Question about this

    Quote Originally Posted by Yves Kreis View Post
    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

  4. #19
    Join Date
    Jul 2007
    Location
    Luxembourg
    Posts
    143
    Code:
    public class a extends ... {
      public static GUIAccess gui = ...
      ...
    }
    public class b extends ... {
      ...
      a.gui.enableExitButton(false);
      ...
    }

  5. #20
    Join Date
    Jul 2007
    Posts
    55

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

    Quote Originally Posted by Yves Kreis View Post
    Code:
    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)

    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.");
    }

    }

    }

Page 4 of 8 FirstFirst ... 23456 ... LastLast

Posting Permissions

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