Jump to content

Sign in to follow this  
rcbarend

TIP: XML events and the stack

Recommended Posts

Yet ANOTHER bug in a gauge of mine solved ..LOLIf you program XML gauges, and rely on stack operations (like the "d" and "r" commands), note that ALL events take a value from the stack, even events that logically don't require a value (and simply read but ignore the read value). Which might not be what you expect; that is: I didn't :-)Example:(>K:TOGGLE_TAXI_LIGHTS)by itself works perfectly and gives the same result as 1 (>K:TOGGLE_TAXI_LIGHTS)or100 (>K:TOGGLE_TAXI_LIGHTS)However,3 (>K:TOGGLE_TAXI_LIGHTS) (>G:Var1)DOESNOT set Var1 to 3, but to the previous value on the stack.3 100 (>K:TOGGLE_TAXI_LIGHTS) (>G:Var1)DOES set Var1 to 3.Cheers, Rob

Share this post


Link to post
Share on other sites

>3 100 (>K:TOGGLE_TAXI_LIGHTS) (>G:Var1)>DOES set Var1 to 3.Er, why not simply put the value for G:Var1 in front of the actual call, e.g.:(>K:TOGGLE_TAXI_LIGHTS) 3 (>G:Var1)???


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556

Interests: Gauge Programming - 3d Modeling for Milviz

Many Thanks to All That Donated To Our Server Drive!

Share this post


Link to post
Share on other sites

Hi Bill,Yes, of course ...But it was just an example to illustrate my point :-)Rob

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    17%
    $4,475.00 of $25,000.00 Donate Now
×
×
  • Create New...