gplacke
Posts: 2
Joined: Fri Oct 12, 2012 6:34 am

Subscribed Event for Edit control

Hi all,

I am wondering whether it would be possible to let the installer react upon a change in an edit control.
Let me give an example on what I would like to achieve:
I would like the user to enter a hostname and port number and automatically build up a URL:
e.g. "http://[HOST]:[PORT]/SoapEndpoint"
Now as soon as the user starts typing I would update a field containing my web service endpoint. The endpoint itself is disabled, but can become enabled when checking a check button.

I tried creating a condition on the Host edit control, but there is nothing useful that I can do with it.
There are no Published Events possible and Subscribed Events has no Subscribe To value to enter.

Please advise?
Thanks in advance.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Subscribed Event for Edit control

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can proceed like this:
- Go to "Dialogs" page and add a new dialog.
- Add three edit box controls like this:
  • Property Name: HOST
    Enabled: True

    Property Name: PORT
    Enabled: True

    Property Name: EndPoint
    Enabled: False
- Add a check box control like this:
  • Property: MY_PROP
    Value: checked
- On the check box control add a "Set installer property value" published event like this:
  • Name: [EndPoint]
    Argument: http://[HOST]:[PORT]/SoapEndpoint
- On the EndPoint edit box control add two control conditions like this:
  • Condition: MY_PROP <> "checked"
    Action: Disable

    Condition: MY_PROP = "checked"
    Action: Enable
- Build and run your project.

Let us know if this helps, otherwise give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
gplacke
Posts: 2
Joined: Fri Oct 12, 2012 6:34 am

Re: Subscribed Event for Edit control

Hi Daniel,

Thanks for your reply.
Your solution is indeed a workaround albeit not so user friendly because it requires an extra check.
The workaround solution makes me suggest it is not possible to handle user input events right?

Thanks and kind regards,
gplacke
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Subscribed Event for Edit control

Hello,

I'm afraid this is not possible because edit box controls don't support published events. Also, as another solution you can move the "EndPoint" edit box on the next dialog and add the "Set installer property value" published event on the [Next>] button from current dialog.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”