Page 1 of 1
IA 2012: Compile error: Statements other than DISPLAY DIALOG
Posted: Thu Oct 13, 2011 8:10 am
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?
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Thu Oct 13, 2011 1:37 pm
by giaviv
Hi,
Please try removing that comment from over there.
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Fri Oct 14, 2011 12:48 am
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.
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Fri Oct 14, 2011 9:27 am
by giaviv
Are you able to use those as a workaround?
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Mon Oct 17, 2011 2:20 am
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.
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Mon Oct 17, 2011 8:32 am
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.
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Tue Oct 18, 2011 1:05 am
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.
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Tue Oct 18, 2011 9:01 am
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.
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Wed Oct 19, 2011 12:29 am
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]
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Wed Oct 19, 2011 8:49 am
by giaviv
What is the value of these compiler variables when this compiles successfully?
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Wed Oct 19, 2011 10:04 pm
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
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Thu Oct 20, 2011 12:28 pm
by giaviv
Thank you. Were you able to work around this?
Re: IA 2012: Compile error: Statements other than DISPLAY DI
Posted: Thu Oct 20, 2011 10:14 pm
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.