[MaskedEdit] Control / published events on MaskedEdit Bug? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

alavoler
Posts: 45
Joined: Thu Mar 12, 2009 4:29 pm
Location: France
Contact: Website

[MaskedEdit] Control / published events on MaskedEdit Bug?

Hello,

I have a probleme.
I need control number port value:

- I choose two MaskedEdit
- <#####> Property text
- Default value PORT_NUMBER_PUBLIC = 5000
- Default value PORT_NUMBER_ADMIN = 6000

On Next:
- In published events
New Dialog | FolderDlg | PORT_NUMBER_PUBLIC > 0 AND PORT_NUMBER_PUBLIC < 65536 AND PORT_NUMBER_ADMIN > 0 AND PORT_NUMBER_ADMIN < 65536 AND PORT_NUMBER_PUBLIC <> PORT_NUMBER_ADMIN


if I do not click on MaskedEdits control.... next enable show the next dialog

But if i click in a MaskedEdit ( juste click or change value!) next don't work

It s a bug ?
I think when i click in MaskedEdit... the value must change property ( integer ----> string) and the condition don't work... but it assumption

thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: [MaskedEdit] Control / published events on MaskedEdit Bug?

Hi,

Indeed the property values are stored as strings, so the condition you are using is not valid. A solution would be to use an UI custom action to transform the strings in integers and compare them. Here is some sample VBScript code:

Code: Select all

Dim port_public
Dim port_admin
port_public = Session.Property("PORT_NUMBER_PUBLIC")
port_admin = Session.Property("PORT_NUMBER_ADMIN")

If CLng(port_public) > 0 And CLng(port_public) < 65536 And CLng(port_admin) > 0 And CLng(port_admin) < 65536 And port_public <> port_admin Then
  Session.Property("EXPRESSION") = "True"
Else
  Session.Property("EXPRESSION") = "False"
End If
After this custom action runs you can use the condition:

Code: Select all

(EXPRESSION = "True")
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”