Validate “FolderEdit” control in “FolderDlg” - 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!

ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Validate “FolderEdit” control in “FolderDlg”

Hi

In “FolderDlg” can I put the validation that “FolderEdit” control should not left blank.

Currently if user make blank “FolderEdit” control in “FolderDlg” and click on Next, he can move to next dialog with out entering the Path (Because default path is these in APPDIR).

I want to restrict this, if “FolderEdit” is blank user should not move further.

Please help.

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

Re: Validate “FolderEdit” control in “FolderDlg”

Hi Amit,

Please note that the User Guide contains the Make sure an edit box is not empty how-to which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: Validate “FolderEdit” control in “FolderDlg”

Hi

Thanks for reply...

But how to check the same condition for APPDIR. My control "FolderEdit" property is set to APPDIR and i m checking the same condition as you mentioned but it is not working.

Thanks
Amit
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Validate “FolderEdit” control in “FolderDlg”

Hi,

Here is what you could try:
-- instead of simply using APPDIR as a condition you could try the following condition:

Code: Select all

APPDIR = "default installation path"
However, you should know that even if the user lets the path from the FolderDlg empty the installation will not fail because the installer will
automatically reset it to the default installation path that you have set when building the package.

Can you please give us more details on why do you wish to apply the checking operations on the PathEdit control?
Is the user supposed to always change the installation path of the product?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: Validate “FolderEdit” control in “FolderDlg”

Hi

yes user can change the location in the installer. i can not set it to default and I need to validate that it should not left blank.
Currently if user manually make it blank and move next, installer automatically takes default path. (This I do not want, I want to make sure that "PathEdit" control is not left blank.

Thanks for help
Amit
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Validate “FolderEdit” control in “FolderDlg”

Hi,

Here is another method:

-- create a new dialog on which you add an edit box (which will have a different property attached, not APPDIR) in which the user should enter the installation path
-- here is an article that shows how to implement browse for folder, need for the new dialog
-- on this new dialog apply the method described in the article that Cosmin has mentioned earlier
-- in the new dialog create a published event which will set APPDIR to the value of property attached to the new edit box only if the new property is not empty
-- otherwise a warning message will be presented to the user as in the example from the article

Please let us know if you have any questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”