Attached code snippet shows some code that's puzzling me:
[compiler if Variable MYCOMPILERVARIABLE is Defined ]
MessageBox: My compiler variable..., ...is defined.
[compiler end]
I've defined a compiler variable in the Project Options. If I set a breakpoint on the [compiler if...] statement it seems to step on to the MessageBox but it displays nothing.
If, however, I change the code to:
[compiler if Variable MYCOMPILERVARIABLE Equals 1234567890]
MessageBox: My compiler variable..., #MYCOMPILERVARIABLE#
[compiler end]
It steps on to the MessageBox and it displays the value correctly.
My question is this: Should the "is defined" work if the compiler variable is defined (which it is) regardless if it has a value or not? Or am I misunderstanding what "is defined" means?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
Did a little bit of testing and to me it seems that the is defined check doesn't work at all.
Tried with just adding the variable without any value, with a value and not having a added it at all. And in all cases it doesn't seem to me like the code inside it is actually executed :-S
StyX wrote:Did a little bit of testing and to me it seems that the is defined check doesn't work at all.
Tried with just adding the variable without any value, with a value and not having a added it at all. And in all cases it doesn't seem to me like the code inside it is actually executed :-S
That was my observation as well. Time for Michael to step in and put us both out of our misery.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
I have confirmed with R&D that the last two options in the drop down on the Compiler Variable If dialog are currently not available for compiler variables. Sorry about this bug...
These do work well in the If dialog of course.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
I will probably not use compiler variables that often but it's nice to see that you control them from one project options dialog.
I hate it when things can only join up unless you scatter the options in multiple hard to get at places which has been my experience with another product.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP