Codger wrote:I'm still missing the original sin. Why does it lock in on the first run and not update when updated?
Let's say that for the sake of future extrapolation I really wanted to construct this in a way that [setwarningcolor] could be used as a variable with a value of one of the two colors based on the criteria in the OP. How would I construct that? I've tried countless different routes and there is always some rule that blocks the final pieces coming together or it functioning.
Well, let's explore your code...
Code: Select all
[SetWarningColor]
Measure=String
String=[MeasurePostalCode]
IfMatch=02346|02347
IfMatchAction=[!SetOption SetWarningColor String #PureRed#]
IfNotMatchAction=[!SetOption SetWarningColor String #PureWhite#]
IfMatchMode=1
DynamicVariables=1
;UpdateDivider=-1
Lets' say that on the first skin update the value of [MeasurePostalCode] is 02347. What happens?
The IfMatchAction is "true"
It changes the String option on the measure [SetWarningColor] from being the current value of [MeasurePostalCode] to being a static "255,0,0,255" or whatever the value of #PureRed# is. So now it is:
Code: Select all
[SetWarningColor]
Measure=String
String=255,0,0,255
IfMatch=02346|02347
IfMatchAction=[!SetOption SetWarningColor String #PureRed#]
IfNotMatchAction=[!SetOption SetWarningColor String #PureWhite#]
IfMatchMode=1
DynamicVariables=1
;UpdateDivider=-1
On the very next update the IfMatch is now certain to be "false", as it certainly can't be 02346 OR 02347, it's hard coded to "255,0,0,255"
So the IfMatchAction is "false"
It changes the the String option on the measure [SetWarningColor] from being a static "255,0,0,255" to being a static "255,255,255,255" or whatever the value of #PureWhite# is. So now it is:
Code: Select all
[SetWarningColor]
Measure=String
String=255,255,255,255
IfMatch=02346|02347
IfMatchAction=[!SetOption SetWarningColor String #PureRed#]
IfNotMatchAction=[!SetOption SetWarningColor String #PureWhite#]
IfMatchMode=1
DynamicVariables=1
;UpdateDivider=-1
This will ALWAYS and forever be "false" and it just stays white until you refresh the skin. At that point it will start over, red once, white forever...
It no longer cares what the value of [MeasurePostalCode] is, why would it?
See my earlier post with an example of what I think you intend, and how to get there.