Hi,
Navigating through the forum I came across this thread:
http://www.fsdeveloper.com/forum/showthread.php?t=174646
and also found more comments scattered in other threads as well.
Well, this is an "issue" (elegant synonymous of bug) in FSX, related to the way <String> element's scripts are stored into the element's display buffer. This affects both <Text> and <FormattedText> string types.
I'm not good at tech explanations, but I'll do my best to be understood:
This happens with a string element that is a direct child of a gauge; when it is created (at gauge's init, or by a panel/gauge redraw of any kind), if it has a <Visible> condition that is false at the first evaluation, the content of the script is not passed to the element's display buffer. Despite this, the script is indeed evaluated and its result saved in a "script buffer". When the next cycle comes, the script result is reevaluated and compared to what is currently in its "buffer"; if both are different the new result is transfered to the display buffer, otherwise nothing happens and the display buffer maintains its current data.When a <Visible> conditional is set to true, whatever is in the display buffer is made "visible" (transfered to the visible screen) BUT, as the display buffer is empty, nothing is shown. However, as soon as a new script result is at least one bit different from the previous, the display buffer is updated and, if <Visible>, transfered to the screen.
Naturally there's a simple way to overcome this "issue": to place the <String> element as a child (inside) of another element which is the one that contains the <Visible> tag:
For example, instead of this:
Write this
When the parent element visibility comes to true, forces all its child elements to update their display buffers.
Hope it wasn't much
Tom
Navigating through the forum I came across this thread:
http://www.fsdeveloper.com/forum/showthread.php?t=174646
and also found more comments scattered in other threads as well.
Well, this is an "issue" (elegant synonymous of bug) in FSX, related to the way <String> element's scripts are stored into the element's display buffer. This affects both <Text> and <FormattedText> string types.
I'm not good at tech explanations, but I'll do my best to be understood:
This happens with a string element that is a direct child of a gauge; when it is created (at gauge's init, or by a panel/gauge redraw of any kind), if it has a <Visible> condition that is false at the first evaluation, the content of the script is not passed to the element's display buffer. Despite this, the script is indeed evaluated and its result saved in a "script buffer". When the next cycle comes, the script result is reevaluated and compared to what is currently in its "buffer"; if both are different the new result is transfered to the display buffer, otherwise nothing happens and the display buffer maintains its current data.When a <Visible> conditional is set to true, whatever is in the display buffer is made "visible" (transfered to the visible screen) BUT, as the display buffer is empty, nothing is shown. However, as soon as a new script result is at least one bit different from the previous, the display buffer is updated and, if <Visible>, transfered to the screen.
Naturally there's a simple way to overcome this "issue": to place the <String> element as a child (inside) of another element which is the one that contains the <Visible> tag:
For example, instead of this:
Code:
[FONT="Courier New"]<Gauge Name=...etc>
<Element>
<Position, etc>
<Visible>Bool</Visible>
<Text> or <Formattedtext>
<String>...
[/FONT]
Write this
Code:
[FONT="Courier New"]<Gauge Name=...etc>
<Element>
<Position, etc>
<Visible>Bool</Visible>
<Element>
<Position, etc>
<Text> or <Formattedtext>
<String>...[/FONT]
When the parent element visibility comes to true, forces all its child elements to update their display buffers.
Hope it wasn't much
Tom
Last edited:




