• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    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.

FSX Update section in XML (again)

rcbarend

Resource contributor
Messages
435
Country
netherlands
I've read many threads on the Update section in an XML gauge, but for some reason (my age ?...LoL) I still can't grasp the idea behind it.

I mean, what's the advantage of using
Code:
<Update Hidden="Yes">
  (L:Test,number) ++ (>L:Test,number)
</Update>

instead of

<Element>
  <Select>
    <Value>
      (L:Test,number) ++ (>L:Test,number)
    </Value>
  </Select>
</Element>
???
I've read that the Element structure was intended more for grafical parts of the gauge, and the Update section intended more for "logic" control code).
I also understand the limitation of one Update section in a gauge (which is just a disadvantage).

Since most of my gauges are bitmap-less control gauges: is there any advantage in using Update section instead of Element sections ??

There is one thing I could think of.
Hidden="..." suggests that you can control execution of the code depending on visibility of the window in which the gauge is defined.
So if you define the gauge in a 2D-panel window:
- If Update Hidden="Yes" : Lvar Test is always updated.
- If Update Hidden="No": Lvar Test is only updated when the 2D-panel window is actually visible.

Simular to the On-Event trapping in FSX.

But whatever I tried, I can't detect any difference between using Hidden="No" or "Yes".
Is there ?? And if so, what ??

Thanks, Rob
 
Hi Tom,

Yes , I read that thread too , but there's nothing in there on what the Hidden=.. does (or is supposed to do).
Unless I'm overlooking it ....

Rob
 
Roman Stoviak offered an explanation in this old AVSIM thread, copied below. I will take his word for it as I've never used Hidden="Yes" in my stuff.

In DVA's code, he shows <Update Hidden="Yes" ... What does Hidden accomplish?

If the window holding the gauge with this update is closed the <Update> section will remain doing it's thing.


Bob
 
To clarify a bit more:

<Update> defaults to Hidden="Yes", meaning all of the scripts in <Update> and <Element> keep running even when the 2D panel is not visible (but has been loaded previously). No need to use the word "Hidden" in this case.

To prevent ALL of the scripts in <Update> and <Element> from being executed when the 2D panel is closed, <Update Hidden="No"> must be added.

"Hidden" property has no effect on gauges in Virtual Cockpit.

There is not necessary to use "Hidden=No" property unless the 2D panel gauge contains a lot of complex scripts that don't manage constant updtating code.

Tom
 
Code:
To clarify a bit more:

<Update> defaults to Hidden="Yes", meaning all of the scripts in <Update> and <Element> keep running even when the 2D panel is not visible (but has been loaded previously). No need to use the word "Hidden" in this case.

To prevent ALL of the scripts in <Update> and <Element> from being executed when the 2D panel is closed, <Update Hidden="No"> must be added.

"Hidden" property has no effect on gauges in Virtual Cockpit.

There is not necessary to use "Hidden=No" property unless the 2D panel gauge contains a lot of complex scripts that don't manage constant updtating code.

Tom
Hi Tom,

This is exactly how I expected <Update Hidden="No"> to work.
However, it doesn't with me .......

So, with
Code:
<Update Hidden="No">
  (L:Test,number) ++ (>L:Test,number)
</Update>
running in a gauge defined in a 2D panel window, the code keeps running (Lvar Test keeps incrementing) after I close the 2D panel window.

By the way: I tested this in FSX-Aceleration ....

Anyway, it's a bit accademic since I've never used it; just wanted to understand ......

Thanks for the responses .

Cheers, Rob
 
I've read many threads on the Update section in an XML gauge, but for some reason (my age ?...LoL) I still can't grasp the idea behind it.

I mean, what's the advantage of using
Code:
<Update Hidden="Yes">
  (L:Test,number) ++ (>L:Test,number)
</Update>

instead of

<Element>
  <Select>
    <Value>
      (L:Test,number) ++ (>L:Test,number)
    </Value>
  </Select>
</Element>
Rob, the chief advantage is that you can place all your begs in one askit (so to speak). By that I mean that all of your "logic" is in a single <container> which is far less verbose, and means you don't have to scroll through potentially hundreds of lines to trace your logic flow.
 
Rob, the chief advantage is that you can place all your begs in one askit (so to speak). By that I mean that all of your "logic" is in a single <container> which is far less verbose, and means you don't have to scroll through potentially hundreds of lines to trace your logic flow.
Hi Bill, thanks for replying but Tom's answers made me see the "light" a long time ago (the thread is already 2 years old, before the other Bill (L) ressuracted it ..LoL)
 
Hi Bill, thanks for replying but Tom's answers made me see the "light" a long time ago (the thread is already 2 years old, before the other Bill (L) ressuracted it ..LoL)
Argh! I need to start paying more attention to the post dates! :stirthepo
 
Back
Top