Multiple Conditions for a Feature?
Posted 10 November 2008 - 07:44
as far as I have understood the doucumentation, it is possible to add multiple conditions for a given feature via the Components table, setting different feature install levels each.
However, I found nothing about what happens if those conditions are not mutually exclusive. Is there a certain order in which the conditions are evaluated, or is the behaviour just unpredictable?
Posted 12 November 2008 - 01:20
Do you mean the order in which the table rows are processed?
I'm not sure if this is documented anywhere. Best bet is to code you conditioning to avoid this.
Posted 12 November 2008 - 08:07
Yes, each condition is evaluatdda se ither TRUE or FALSE. But if it is true, it sets the install level of the corresponding feautre. And I think this can be very ambiguous.
Posted 12 November 2008 - 09:58
|QUOTE (Matthias1967 @ 2008-11-12 07:07)|
|Yes, each condition is evaluatdda se ither TRUE or FALSE. But if it is true, it sets the install level of the corresponding feautre. And I think this can be very ambiguous.|
Is this something like what you have:
...If IE7PRESENT InstallLevel=700
...If Not IE7PRESENT InstallLevel=600
or something more complex (silly, pointless logic, but I'm illustrating my question):
...If IE7PRESENT INSTALLPLUGINVERSION=7
...If Not IE7PRESENT INSTALLPLUGINVERSION=6
IF INSTALLPLUGINVERSION=7 InstallLevel=700
IF INSTALLPLUGINVERSION=6 InstallLevel=600
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.
Posted 12 November 2008 - 11:58
Also I think it's a rather unusual situation if you need to set the feature's install level to 100 in one case, to 200 in another case, and to 300 in yet another case. So to better understand your needs, could you tell us more about your requirements and why you need to do this?
Posted 14 November 2008 - 15:44
Then my original idea was something like
if (bCondition1) installlevel=100;
if (bCondition2) installlevel=200;
if (bCondition3) installlevel=300;
as a "shorthand" for
if (bCondition1 && !bCondition2 && !bCondition3) installlevel=100;
if (!bCondition1 && bCondition2 && !bCondition3) installlevel=200;
if (!bCondition1 && !bCondition2 && bCondition3) installlevel=300;
Posted 19 November 2008 - 10:08
Posted 23 November 2008 - 11:43