Repeat Feature for Measures and Meters
This pr requests adds the ability to repeat measures and groups of meters. The need for this should be obvious to any one who has tried to create any sort of list or table. eg. Currently, 5 measures x 10 rows is 50 measures you have to create. Yuck. Add the 50 meters needed to display that and, well, no thanks! This pr fixes that.
Measures
Adds a "Reapeat=X" option where X is the number of times to repeat (starting at 1) Measures will be created with the X suffix and #i# will be replaced in the measures options with X as well.
Example
; In your Meter.ini
[MeasureQuote]
Measure=WebParser
URL=#URLPrefix##Ticker#i##
Repeat=2
Would result in...
[MeasureQuote1]
Measure=WebParser
URL=#URLPrefix##Ticker1#
[MeasureQuote2]
Measure=WebParser
URL=#URLPrefix##Ticker2#
Meters
Adds a Meter=Repeat that has two options
- Count=X (the number of times for the group to repeat, starting at 1)
- RepeatMeters=[comma separated list of meternames] Like measures any #i# in Meter options will be replace with the Count value
Example:
; In your Meter.ini
[MeterQuoteName]
Meter=String
MeasureName=MeasureQuoteName#i#
[MeterQuotePrice]
Meter=String
MeasureName=MeasureQuotePrice#i#
[MeterRepeat]
Meter=Repeat
Count=2
RepeatMeters=MeterQuoteName,MeterQuotePrice
would result in
[MeterQuoteName1]
Meter=String
MeasureName=MeasureQuoteName1
[MeterQuotePrice1]
Meter=String
MeasureName=MeasureQuotePrice1
[MeterQuoteName2]
Meter=String
MeasureName=MeasureQuoteName2
[MeterQuotePrice2]
Meter=String
MeasureName=MeasureQuotePrice2
Anyway
I've attached a Test.ini A Test Meter demonstrating these features. Test.ini.txt
Output of test meter (the ugly square) and what I actually created this for a table of quotes that doesn't need 5k measures and meters to do it!
This looks promising as an alternative to a Lua based approach with skin refreshes (I'm assuming the repeated meters would be virtual and not physically written to file? As this would be nice for dynamically adjusting the number of meters on the fly without refreshes).
About the meter/measure naming: is different syntax possible? Eg: if one has meters that use the instance number in the middle of the meter name rather than at the end, such as Foo_1_Bg, Foo_1_Str, etc.