IA 2012: Compile error: Statements other than DISPLAY DIALOG

Got a problem you cannot solve? Try here.
Post Reply
pfennig

IA 2012: Compile error: Statements other than DISPLAY DIALOG

Post by pfennig »

We just upgraded from IA 9R2 to IA 2012.

After loading a previously intact setup script and trying to run it I'm getting the message:
Compile error: Statements other than DISPLAY DIALOG not allowed inside WIZARD LOOP

the loop in question looks this way:

wizard loop
Display Dialog: maintenance, wait for dialog to return (modal)
[compiler if Variable build_download Equals 1]
[compiler if Variable build_features Contains (Ignore Case) D]
Display Dialog: download_multioptions (if variable MODIFY is TRUE), wait for dialog to return (modal)
[compiler else]
Comment: Display Dialog: download (if variable MODIFY is TRUE), wait for dialog to return (modal)
[compiler end]
[compiler end]
Display Dialog: startinstallation, wait for dialog to return (modal)
end

What might be the problem?
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by giaviv »

Hi,

Please try removing that comment from over there.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
pfennig

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by pfennig »

Thanks, but no, it didn't help. And, IMO, comments shouldn't cause a compile error :|

It alway crashes in the last Display Dialog line.

UPDATE:
It doesn't crash when compiler variable build_download <> 1, and when I remove
these two compiler conditions all together it doesn't crash either.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by giaviv »

Are you able to use those as a workaround?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
pfennig

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by pfennig »

I'm not exactly sure what you mean, but as it turns out, wizard loop doesn't seem to
accept compiler variables when their comparison result is true.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by giaviv »

When the comparison result isn't true, the dialog wizard doesn't get compiled at all.
When it does get compiled, you can't have any commands other than Display Dialog inside the wizard loop.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
pfennig

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by pfennig »

giaviv wrote:When the comparison result isn't true, the dialog wizard doesn't get compiled at all.
Yes, of course.
giaviv wrote:When it does get compiled, you can't have any commands other than Display Dialog inside the wizard loop.
That's the way it looks and what the message says, but in Version 9R2 you could have compiler conditions (see my initial code sample).
I consider it a bug that you can't even use compiler conditions anymore. It breaks existing code.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by giaviv »

As of version 10, you can't have anything other than display dialog commands inside wizard loops. This is not a bug, but rather the way IA was designed.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
pfennig

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by pfennig »

What was the reason for this change?

Anyway, it doesn't seem to be consistent since I got the following construct to work:

Code: Select all

[compiler if Variable build_download Equals 1]
wizard loop
  Display Dialog: maintenance, wait for dialog to return (modal)
[compiler if Variable build_features Contains (Ignore Case) D]
  Display Dialog: download_multioptions (if variable MODIFY is TRUE), wait for dialog to return (modal)
[compiler end]
  Display Dialog: startinstallation, wait for dialog to return (modal)
end
[compiler else]
wizard loop
  Display Dialog: maintenance, wait for dialog to return (modal)
  Display Dialog: startinstallation, wait for dialog to return (modal)
end
[compiler end]
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by giaviv »

What is the value of these compiler variables when this compiles successfully?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
pfennig

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by pfennig »

build_download Equals 1
build_features Contains (Ignore Case) D

It compiles in every possible combination.

In a less extensive project the following code works as well, with both build_download Equals 1 or 0

Code: Select all

wizard loop
  Display Dialog: maintenance, wait for dialog to return (modal)
[compiler if Variable build_download Equals 1]
  Display Dialog: download (if variable MODIFY is TRUE), wait for dialog to return (modal)
[compiler end]
  Display Dialog: startinstallation, wait for dialog to return (modal)
end
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by giaviv »

Thank you. Were you able to work around this?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
pfennig

Re: IA 2012: Compile error: Statements other than DISPLAY DI

Post by pfennig »

My last two pieces of code do work, thankfully. And I hope it'll stay this way
after the next InstallAware update.

But they are examples for the inconsistency in the handling of other lines of
code but DISPLAY DIALOG inside wizard loops. Sometimes they are accepted,
sometimes obviously not.

I'd still like to know the rationale behind the decision to not allow other code
but DISPLAY DIALOG inside wizard loops. At least for compiler variables it
doesn't make any sense to me to not accept them.
Post Reply