Page 1 of 1

Destination Dialog Problems

Posted: Mon Nov 08, 2010 8:00 am
by Roostar2004
I am having some issues with the destination dialog doing what I want it to do. Here is my problem.

I have a field on the form that reads from the installation directory which by default is $PROGRAMFILES$\MyFolder\MyFolder2 and save to the variable TARGETDIR. I also have a button next to the field that is used to allow the user to select a destination directory. The problem is that no matter what folder the user chooses say C:\New Folder it will always append the MyFolder\MyFolder2 to the end of it. So they select C:\NewFolder but in the destination box is shows C:\New Folder\MyFolder\MyFolder2.

I was wondering if anybody else has seen this problem and if so what would the work around be if there is one?

Re: Destination Dialog Problems

Posted: Mon Nov 08, 2010 9:12 am
by Roostar2004
I have found a work around for this issue which seems to work pretty good.

I have 2 Edit boxes, 1 button, and 1 label.

Button1 selects a custom folder
EditBox1 reads the folder selected by Button1.
EditBox2 is hidden but writes to the TARGETDIR variable
Label1 is hidden but holds the initial value of TARGETDIR

Conditional code:
If EditBox1.Text = "" then Destiation.Text == Label.Caption
If EditBox1.Text <> "" then EditBox2.Text = EditBox1.Text

This resolves the problem of the dialog adding the \MyFolder\MyFolder2 to the end of the selected directory.