Dialog behavior [Written Variable Value]
Posted: Mon Apr 28, 2008 8:24 am
How is the entry [Written Variable Value] in the "Object behavior" Of a dialog control supposed to work?
My naive assumption based on the text and the narrow portion of the help file, was that the control is initialized with the value of the variable, where the value is written to afterwards. But that doesn't seem to work like that.
In our Application we need four directories. The first one is the main one ($TARGETDIR$) and three additional ones $USERDATDIR$, $LIBRARYDIR$ and $DOKVDIR$. The default values of the latter three is $TARGETDIR$\\userdat and simillar for the others. But of course the user can change these.
In the Installshield App, I'm converting, we had a dialog with four DireectoryEditBoxes. With the logic to set the defaults for the later three when the first one changes (only if they were not previously set.)
I didn't see a DirectoryEditControl in InstallAware and no means to put logic like this on a dialog, so I created three copies of the destination dialog. One for each. In the loop the destination dialog for $TARGETDIR$ comes first, and the remaining variables are initialized accordingly. Now here comes the problem: Instead of displaying the directory where the variables got initialized, the tree controls of the remaining destination dialogs start on the desktop folder.
In another thread (http://www.installaware.com/forum/viewt ... f0729652de) I read that one should only use the $TARGETDIR$ variable for things like this, make a backup, and copy the values back and forth.
But I thought that can't be true that I have to hack a cludge like this. What for is the entry in the entry [Written Variable Value] in the "Object behavior" if not for initializing the control with the content of the associated variable?
My naive assumption based on the text and the narrow portion of the help file, was that the control is initialized with the value of the variable, where the value is written to afterwards. But that doesn't seem to work like that.
In our Application we need four directories. The first one is the main one ($TARGETDIR$) and three additional ones $USERDATDIR$, $LIBRARYDIR$ and $DOKVDIR$. The default values of the latter three is $TARGETDIR$\\userdat and simillar for the others. But of course the user can change these.
In the Installshield App, I'm converting, we had a dialog with four DireectoryEditBoxes. With the logic to set the defaults for the later three when the first one changes (only if they were not previously set.)
I didn't see a DirectoryEditControl in InstallAware and no means to put logic like this on a dialog, so I created three copies of the destination dialog. One for each. In the loop the destination dialog for $TARGETDIR$ comes first, and the remaining variables are initialized accordingly. Now here comes the problem: Instead of displaying the directory where the variables got initialized, the tree controls of the remaining destination dialogs start on the desktop folder.
In another thread (http://www.installaware.com/forum/viewt ... f0729652de) I read that one should only use the $TARGETDIR$ variable for things like this, make a backup, and copy the values back and forth.
But I thought that can't be true that I have to hack a cludge like this. What for is the entry in the entry [Written Variable Value] in the "Object behavior" if not for initializing the control with the content of the associated variable?