Clicking Back in a custom dialog does not work

Got a problem you cannot solve? Try here.
Post Reply
MortSkil
Posts: 59
Joined: Mon Oct 30, 2006 3:27 am
Location: Trondheim, Norway

Clicking Back in a custom dialog does not work

Post by MortSkil »

I created a new dialog based on the Wizard.dfm sample. When I insert this dialog into my dialog sequence, clicking Back causes WIZARD to be set to NEXT instead of BACK.

When I click Back on the built-in dialogs that are unchanged, WIZARD is set to BACK as expected.

What have I missed here?
CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Post by CandiceJones »

Edit the MSIcode for your dialog sequence - you probably have the wrong dialog set up when Back is clicked in your custom dialog.
Candice Jones
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
MortSkil
Posts: 59
Joined: Mon Oct 30, 2006 3:27 am
Location: Trondheim, Norway

Post by MortSkil »

I already have:

Code: Select all

Comment: This unchanged from the original MSI Code
label: Destination Directory
Display Dialog: destination, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Custom Setup
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
Comment: I created the datadir dialog by saving the destination.dfm 
                as datadir.dfm, then editing parts of the control to suit
                my needs.
label: Data Directory
Display Dialog: datadir, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Destination Directory
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: Start Menu
etc...
The datadir dialog modifies the DATADIR variable, properly declared at the beginning of the MSICode.
The Interactive charachteristics of the Back button is set to perform action "Go to Previous Dialog".

For the dialogs I have inserted by editing the MSICode, WIZARD is set to NEXT, regardless if Next, Back or Cancel button is clicked in the dialog. The DATADIR variable has been given the desired value, though.

If I click Cancel, the confirmation dialog is displayed, but after confirming, WIZARD is still NEXT.

The destination dialog properly sets the WIZARD value according to what I clicked.

Could it be I load or save the dialogs to a wrong location? How is the relationship between the contents of the Dialogs folder in "Program Files\\InstallAware 8" and the folder in which the IA project file resides?
MortSkil
Posts: 59
Joined: Mon Oct 30, 2006 3:27 am
Location: Trondheim, Norway

Post by MortSkil »

Possibly related:

I define a variable, $LINESOFTEXT$, containing several lines of text that I want to present in a dialog.

In the dialog, I have added a Label control with the Caption property set to $LINESOFTEXT$.

Just before opening the dialog, I set a breakpoint and investigate the LINESOFTEXT variable, which is as expected.

However, when the dialog is presented, the label control shows no text.
MortSkil
Posts: 59
Joined: Mon Oct 30, 2006 3:27 am
Location: Trondheim, Norway

Post by MortSkil »

:oops:
Found a very simple solution to the invisible text problem. The Visible property was set to false... :roll:

However, the dialog still returns Next in WIZARD regardless which button is clicked.

Have anyone experienced the same when injecting new dialogs into the MSIcode?
Post Reply