Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.
By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.
That actually crossed my mind, but I was hesitating. Because why then have the <update> tag at all?This works as well as any update tag and you can use it as often as you like.
Tom, this is interesting. How do I specify the update interval?The only advantage I know about is that you can directly control the update rate of the Update section, which is not possible in an Element. You can use timing code to do the same thing, of course, but that is a clumsier approach. So if I would have things that need an update only once per second (for example), I would put those into the Update section and put the rest into Elements.
Tom, this is interesting. How do I specify the update interval?
<Update Frequency="*"/>
Just made a simple test gauge, which proves my point …I allways understood that if you specify the Frequency in a Update section, this schedule rate applies to the whole gauge (so all other subsequent Element sections too).
<Gauge Name="TEST" Version="1.0">
<Image Name="test.bmp"/>
<Update Frequency="1">
(G:Var1) ++ (>G:Var1)
</Update>
<Element><Select><Value>
(G:Var2) ++ (>G:Var2)
</Value></Select></Element>
<Element><Select><Value>
(G:Var3) ++ (>G:Var3)
</Value></Select></Element>
<Element>
<Position X="2" Y="0"/>
<Text X="48" Y="10" Length="10" Font="arial bold" FontSize="8" Color="#FFFFFF" Adjust="Left" VerticalAdjust="Center">
<String>Var1</String>
</Text>
</Element>
<Element>
<Position X="50" Y="0"/>
<Text X="38" Y="10" Length="10" Font="arial bold" FontSize="8" Color="#FFFFFF" Adjust="Right" VerticalAdjust="Center">
<String>%((G:Var1))%!d!</String>
</Text>
</Element>
<Element>
<Position X="2" Y="10"/>
<Text X="48" Y="10" Length="10" Font="arial bold" FontSize="8" Color="#FFFFFF" Adjust="Left" VerticalAdjust="Center">
<String>Var2</String>
</Text>
</Element>
<Element>
<Position X="50" Y="10"/>
<Text X="38" Y="10" Length="10" Font="arial bold" FontSize="8" Color="#FFFFFF" Adjust="Right" VerticalAdjust="Center">
<String>%((G:Var2))%!d!</String>
</Text>
</Element>
<Element>
<Position X="2" Y="20"/>
<Text X="48" Y="10" Length="10" Font="arial bold" FontSize="8" Color="#FFFFFF" Adjust="Left" VerticalAdjust="Center">
<String>Var3</String>
</Text>
</Element>
<Element>
<Position X="50" Y="20"/>
<Text X="38" Y="10" Length="10" Font="arial bold" FontSize="8" Color="#FFFFFF" Adjust="Right" VerticalAdjust="Center">
<String>%((G:Var3))%!d!</String>
</Text>
</Element>
</Gauge>
Just made a simple test gauge, which proves my point …
By the way, this is in FSX-Accell, but I doubt it's any different in FS9 or any P3D version.
Cheers,
Rob
To me, the major advantage is that most - if not all - of your 'logic' is neatly contained in a single "askit" instead of being scattered willy-nilly in multiple <Element> sections...In fact, other then for specifying the schedule rate, I don't see any advantage in using an Update section at all; since I suspect (but now I am guessing ...LoL) the max. code size restriction within one Element section in a gauge, is the same as within the (only one possible) Update section in an FS9-syntax XML gauge.
Or am I missing something ???