Archived

This topic is now archived and is closed to further replies.

Guest JeanLuc_

Is there an "otherwise" clause ?

Recommended Posts

I need to detect 3 states:Case Value=0 "Smile"Case Value=1 "Frown"OTHERWISE "Bury face in hands"I can't find any XML examples like this construct anywhere. Does it exist?Or maybe I should be using the if{} construct ?Cal - CYXXVE7LZZObvious Newbie

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,You can use a lot of 'sAn example:If condition=0 then 0 (>L:condition,enum)If condition=better then 1 (>L:condition,enum)If condition=much better then 2 (>L:condition,enum)If condition=best then 3 (>L:condition,enum)etc.now let the bitmaps change by:<(L:condition,enum)If condition=0 then 0 (>L:condition,enum)If condition=better then 1 (>L:condition,enum)If condition=much better then 2 (>L:condition,enum)If condition=best then 3 (>L:condition,enum)etc.(L:condition,enum)Hope it helps,Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Thanks Jan,This confirms the conclusion I've reached.Just getting started. I find information on basic XML gauge programming is scattered and seems a bit sketchy about this kind of logic.But I'll keep plugging away and re-reading the tutorials and examples and hopefully it will sink in.Cal

Share this post


Link to post
Share on other sites

>I need to detect 3 states:>>Case Value=0> "Smile">Case Value=1> "Frown">OTHERWISE> "Bury face in hands">>I can't find any XML examples like this construct anywhere.>Does it exist?>>Or maybe I should be using the if{} construct ?>>Cal - CYXX>VE7LZZ>Obvious NewbieHi,The OTHERWISE can be implicit placing a default bmp in the -For example:SCRIPT"Smile""Frown"etcAny value returned by SCRIPT different from 1 or 2 will make the element show the default image.Tom

Share this post


Link to post
Share on other sites

Oooops, forgot to post a reply to Tom.Thanks Tom. That's essentially what I ended up doing with a separate Element for each condition of each gear.In my case, gear down is green, gear in transit is red and gear up is no lights. Your use of the word, 'implicit' was the key.Cal - CYXXVE7LZZ

Share this post


Link to post
Share on other sites