February 8, 200719 yr Hi experts,A question (or warning ?) for you.......In all my XML gauges for FS9 I use simple constructions like:(A:SIM ON GROUND,bool)SPBRKWhich works without any problem.Iow: print a string or not, based on a certain condition.Now, in FSX this code doesn't work properly.- If I load the 2D-panel (in Windowed mode) sometimes the string will be displayed when appropriate, sometimes it won't. Usually the first section in the gauge that does this, works, and the next sections with the same construction don't.- And if it doesn't, switching to Fullscreen mode, suddenly displays the string correctly (but not always).- And when switching to Fullscreen mode solved it, after switching back to Windowed mode it works normally for the rest of the flight.Now, if I code it like this:(A:SIM ON GROUND,bool)SPBRK(so: pack the string printing in a nested element) the problem is entirely gone.Weird ???Or can someone explain why the first code is wrong ?Cheers, Rob Barendregt
February 8, 200719 yr >Hi experts,>>A question (or warning ?) for you.......-SNIP->Weird ???>>Or can someone explain why the first code is wrong ?>>Cheers, Rob Barendregt>The new Aces XML is weird to begin with and perhaps theparser is different now for the old, reliable XML.In any case, it may be because the "new" Aces format isso overly BLOATED and your initial code is NOT :)Sorry I have no real answer to your question. Paul
February 9, 200719 yr Commercial Member Rob,I wish I knew, and just to support what Paul said, it's probably got something to do with the new syntax . Who KNOWS what subtle perfectly legit structures are broken.If I were you, and this may not be the most efficient way to handle it, but probably the most reliable, I'd put the conditional inside the string:%((L:condition, bool))%{if}%BLOATME%{end}--Jon Jon Blum Vertical Reality Simulations
February 9, 200719 yr Well, I'll just accept it as it is then :-)I need to clean up some of the old gauges code anyway...Cheers, Rob
February 9, 200719 yr Rob,I had similar problems with my old gauge when testing it under FSX. Some text was displayed, some not and couldn't figure it out. Finally I rebuilt it using the new XML schema. I started with the ACE.tool to get the mail schema, then I partially worked in UltraEdit32 for copy and paste operations and in ACE to add new elements.A also guess that the new XML parser is not 100 % compliant to the parser used in FS9.rgdslilo
February 9, 200719 yr Author Moderator >A also guess that the new XML parser is not 100 % compliant to>the parser used in FS9.Actually, it is the other way around. The old parsing engine is rather loosey-goosey and not nearly as strict.There are some things one could "get away with" in FS9 that FSX will not permit... ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment