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.

unresolvable XML problem ....

Featured Replies

REALLY struggling with some XML code in the Modeldef file here ......... I have created a new part with both animation and mousclick area, however.. even though it uses the same code as the previous part (and a new checked Guid) the mouserect wont show in the attachtool drop down list :( I've tried changing the name the tooltip everything to no avail .. anyone have a clue ????WORKING CODE ------- shows in drop down list and both animation and click spot works just fine

<PartInfo>		<Name>Emergency_Chute_Handle</Name>		<AnimLength>100</AnimLength>		<Animation>			<Parameter>				<Sim>					<Variable>SPOILERS HANDLE POSITION</Variable>					<Units>percent</Units>				</Sim>				<Lag>100</Lag>			</Parameter>		</Animation>			<MouseRect>				<Cursor>Hand</Cursor>				<TooltipText>EMERGENCY PARACHUTE</TooltipText> 				<MouseFlags>LeftSingle</MouseFlags>				<CallbackCode>				(L:RBF_pin, bool) 1 == if{ (>K:SPOILERS_ON) }				</CallbackCode>			</MouseRect></PartInfo>

NON WORKING CODE ------- CLICK SPOT does NOT show in down list BUT animation works just fine

<Partinfo>		<Name>Pin_remove_before_flight</Name>		<AnimLength>100</AnimLength>		<Animation>			<Parameter>				<Sim>					<Variable>SPOILERS HANDLE POSITION</Variable>					<Units>percent</Units>				</Sim>				<Lag>100</Lag>			</Parameter>		</Animation>			<MouseRect>				<Cursor>Hand</Cursor>				<TooltipText>REMOVE BEFORE FLIGHT</TooltipText> 				<MouseFlags>LeftSingle</MouseFlags>				<CallbackCode>				(L:RBF_pin, bool) 0 == if{ (>L:RBF_pin) }				</CallbackCode>			</MouseRect></Partinfo>

Anyone ???????

  • Moderator

Possibly a syntax error? You aren't supplying a value to send to the L:Var, and you didn't specify the units for the L:Var,Units (required!):

<CallbackCode>    (L:RBF_pin, bool) 0 == if{ 1 (>L:RBF_pin,bool) } </CallbackCode> 

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

And a logic error? What your code does is set RBF_pin to 0... when it's 0What you probably want is:

(L:RBF_pin, bool) 0 == if{ 1 (>L:RBF_pin, bool) }

or

(L:RBF_pin, bool) ! (>L:RBF_pin, bool}

Having said that I've no idea what you're trying to achieve

As said by Bill, failing to specify the "unit" when writing a value into an L:Var, is most likely your problem.This has probably been THE most common (and hard-to-find) error I make/made myself when writing XML gauges :( 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.