TShellTree Problem with path for non folders

Got a problem you cannot solve? Try here.
Post Reply
Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

TShellTree Problem with path for non folders

Post by Treoxx »

Hello,

I like to use PTShellTree for browsing for a license file.
(This file will be later copied to the installation folder)

The options make it possible to show non-folders in the tree list.
The only problem is that when I select a file the path in the TARGETDIR is set to:

c:\\programfiles\\testdir\\licence.txtThe path is always like an folder even when I select non folders.

Is there any solution for this?
(Exept empty the TARGETDIR variabele before the window has opened.)

Thanks!
CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Post by CandiceJones »

Hi!

You could just use Parse String and remove the last "\" that way.
Candice Jones
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Post by Treoxx »

yes, that is an option I've tried.

But it looks stupid for the user at the time a file is choosen, and there are some other troubles.

Like this:

Choose file:

D:\\testdir\\test.txt\\

next
back

D:\\testdir\\test.txt

next
back
Choose other file! and than it happends:

D:\\testdir\\theotherfilecomeshere.txt\\test.txt



Yust tried again: Above doen't have anything to do with the parse string, it is always happening, the second try to select a file.
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

You may want to try the "File Dialog" plugin to return the file name.

Available here:mdPlugins
Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Post by Treoxx »

I've tried the plugin and it is a workable option.

The problem is just:

The user has to choose three different things:

InstallationDir
DatabaseDir
Licensefile

I'd like to see that all dialogs work on the same way to keep it simple, fast and clean.

InstallationDir and DatabaseDir are not a problem with the PTShellTree, the licensefile is another story.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Maybe you can use the PTShellList to select the file? After all, that control is specifically designed to display files.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Post by Treoxx »

I've tried the PTShellList but I'm having the same problems.
The slash is always there even after a file selection.

And the problem I've described in the post in this tread at Wed Feb 01, 2006 2:57 pm.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Hi!

I built an example project for you...its called "File Selector" and contains Explorer controls.

I have attached the built EXE and the sources of the project. It works fine as far as I can tell...please take a look!

File Attached:

File Selector.zip
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Post by Treoxx »

Michael,

That is the exact same way I did to get the problem out of the way :)

The problem was that I liked to use an edit box with it, so the user can fill in the location of the file without browsing, so I had to use the variable TARGETDIR. (To let show the selected path in the edit box.)

I've changed your version to my first solution, with the problem with the slashes.

Try to select a file, next - back - select another file.
And have a look at the PATH.

Many thanks for the support by the way!

File Attached:

File Selector.zip
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Ah, I see! This is because you are setting the "receives value" field to "installation folder", which is causing the file path to be modified like a folder path.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Post by Treoxx »

MichaelNesmith wrote:Ah, I see! This is because you are setting the "receives value" field to "installation folder", which is causing the file path to be modified like a folder path.
Thats true,

But if I don't do that the edit box is not interactive with the PTShellList.
So I can never show an good filepath in an interactive editbox.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Don't worry - we're addressing this control interactivity issue very soon. Having to fall back on TARGETDIR for everything is getting quite inconvenient, so we will resolve this!
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply