I have a question on the visibility scope of G:vars in P3Dv4.*
What I'm after:
I want to detect, if in a panel.cfg an XML gauge is defined (and loaded/running) multiple times.
Reason: for the type of "control" gauges that I make, this gives problems sometimes.
In FSX-Accelleration, I use this code:
Meaning that if a gauge containing this code is defined (and loaded/running) multiple times in the panel.cfg, the Lvar (L:MyInitVar,enum) counts this.
Which appears to work perfect, since:
- The visibility scope of a G:Var is limited to one defined/running instance of the gauge.
- The visibility scope of a L:var is global over all instances of all loaded gauges (and .mdl, etc).
My question: does this still work in P3Dv4.* ??
Reason I ask: I don't use P3D, so I can't test it myself.
But some of my XML gauges I develop for FSX, are intented for P3D too.
Just want to make sure nothing has changed in that area.
Thanks, Rob
What I'm after:
I want to detect, if in a panel.cfg an XML gauge is defined (and loaded/running) multiple times.
Reason: for the type of "control" gauges that I make, this gives problems sometimes.
In FSX-Accelleration, I use this code:
XML:
<Element>
<Select>
<Value>
(*** GAUGE INITIALISATION ***)
(G:Var9) 0 ==
if{
(L:MyInitVar,enum) ++ (>L:MyInitVar,enum)
1 (>G:Var9)
}
</Value>
</Select>
</Element>
Meaning that if a gauge containing this code is defined (and loaded/running) multiple times in the panel.cfg, the Lvar (L:MyInitVar,enum) counts this.
Which appears to work perfect, since:
- The visibility scope of a G:Var is limited to one defined/running instance of the gauge.
- The visibility scope of a L:var is global over all instances of all loaded gauges (and .mdl, etc).
My question: does this still work in P3Dv4.* ??
Reason I ask: I don't use P3D, so I can't test it myself.
But some of my XML gauges I develop for FSX, are intented for P3D too.
Just want to make sure nothing has changed in that area.
Thanks, Rob


