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.

XML initialization code

Featured Replies

My XML Question of the Day: Is it possible to have XML code that gets executed just once, at gauge (or panel) load time? That is, without setting my own flag and testing it every frame...

  • Author

No, not possible.But the trick to protect it with a flag works perfect.Don't be worried about performance... The schedule overhead of a gauge that should run only once (but now is scheduled everytime) is not noticeable.But if you are still worried about (if you have an extremely complex panel, with lots of gauges containing such code): Make one gauge that does this initialisation (using L:vars), and let this run with UpdateFrequency 1 (1 schedule per second).But again, it's not worth the effort IMO.Cheers, Rob Barendregt

Perfect, thanks Rob!Douglas

If I understand you correctly, yes it is possible. I have a number of gauges where default values are set on panel load, and do this just once. If you say(G:Var1) if equals zero then set, say, your variable (click or L type)and in the same statement set (G:Var1) to 1, and the variable setting will not be repeated.Nick.

Thanks Nick. I believe this is the solution Rob recommended as well.

  • Author

>Thanks Nick. I believe this is the solution Rob recommended>as well.Yes.Which was (I assume) you already suggested yourself in your original post :-)Cheers, Rob

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.