Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

"disobedient" XML switch

Featured Replies

Hi all, the newbie attacks againI am programming a switch, called "DC Service", that allows to show a two windows, initially hidden, when click on it, but only if the battery is onMy code is here:(L:DC Service, enum)(L:DC Service, enum) ! (>L:DC Service, enum) if{ (A:Electrical master battery,bool) } 844 (>K:PANEL_ID_TOGGLE) 845 (>K:PANEL_ID_TOGGLE)844 and 845 are the ID,s of the hidden windows to show.Of course, the switch will always change position when click on it, but ONLY if the battery is connected (another switch) it will show the hidden windows.My code doesn't work, and always show the hidden windows independently of the battery position.Correct my code, please.Regards,Rafael

  • Author

Rafael,Original:(L:DC Service, enum) ! (>L:DC Service, enum) if{ (A:Electrical master battery,bool) } 844 (>K:PANEL_ID_TOGGLE) 845 (>K:PANEL_ID_TOGGLE)With this example L:DC service gets queried again after it has been toggled within the same click and is checked with the BATT before the if{ toggle windows }:(L:DC Service, enum) ! (>L:DC Service, enum) + (A:Electrical master battery,bool) 1 == (L:DC Service, enum) 1 == & if{ 844 (>K:PANEL_ID_TOGGLE) 845 (>K:PANEL_ID_TOGGLE) }Also one note, you may see that I use 1 == or 0 == for arguments. That can keep things like using a single & & a m p ;much easier for code writing.. ( may not be better for comp. resources though ).. Possibly another thing, when using a ",enum" for example as a unit for a L: var, when the L:var is going to have only 2 states some rules for things like ! (not) may not work.. bool may be better. ( G:Vars work for me this way too) Just things noticed doing this stuff and not necessarily correct. Regards,Roman[link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.