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
Help AVSIM continue to serve you!
Please donate today!

>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)???

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

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this