March 21, 200422 yr Author Moderator >Hi Jan,>>Do you mean to say that G:Var* variables used in 2 .xml gauges>interfere with each other (i.e. the visibility of a G:Var is>NOT limited to one .xml gauge) ???Heh! That's why they're called "Global Variables..." :)L: Local (unlimited #)G: Global (limited to 10: 0-9)For most purposes, I prefer L: type because you can give 'em meaningful names! Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
March 21, 200422 yr Rob,I have a totally integrated autopilot, autoland and thrustmode computer, one xml gauge, and i wanted to put your code in it between the other "modes".Because i used a lot of G:Var's to rotate the knobs and switches, i had to rename them.Btw, busy to change all (G:Var's) in my panel in L:Var's!Jan"Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
March 21, 200422 yr Hi Bill,Sorry, but you wrong :-)From the PanelSDK:G: Gauge var. A variable that is local to this particular gaugeL: Local This parameter can be any user-defined variableSo: "G" stands for Gauge, not for Global :-)So if you want to share variables between gauges, you have to use L: variables.As explained below, Jan's problem with my FLC gauge was caused by the fact that he integrated my code in his existing XML gauge (and therefore has to replace the G: vars I used) ....For gauge-local variables, I normally use G: var, just to limit the amount of typing. Plus I always forget the "units" in L: vars :-)You are right about the "functional naming" of the L: variables; just be aware that other designers might use the same L: var names !!(I solve this by using a gaugename prefix in my variable, to limit this risk. Like: L:FlcState,number)Cheers, Rob
March 21, 200422 yr Author Moderator >Hi Bill,>>Sorry, but you wrong :-)Of course I am! Sorry 'bout that, I must have had a brain-f@rt... :)Of course, L: being defined as "local" doesn't help; it's very misleading! There's nothing in the name to suggest that they may be "shared" between other XML gauges.Leave it to MS to make things chaotic and confused... :) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment