Board index FlightGear Development

Checkbox not checked ...  Topic is solved

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Checkbox not checked ...

Postby Jabberwocky » Tue Nov 18, 2014 9:51 pm

Hi,

I seem to have my blocked moment today. I have

Code: Select all
      
<engine n="0">   <!-- Saturn 127 left -->
         <engine-num type="int">0</engine-num>
         <throttle-norm type="float">0</throttle-norm>
         <reheat-norm type="float">0</reheat-norm>
         <serviceable type="bool">true</serviceable>
</engine>


and a look with browse properties shows later, the serviceable exists and is true. So far so good, but I have a dialog and in that dialog I have

Code: Select all
         
<checkbox>
            <halign>left</halign>
            <label>Saturn 127 Left</label>         
            <property>engines/engines[0]/serviceable</property>
            <binding>                  
               <command>property-toggle</command>   
               <property>engines/engine[0]/serviceable</property>
            </binding>
            <live>true</live>
</checkbox>


and regardless how engines/engine[0]/serviceable is set (true or false), the checkbox is empty. I can mark it of course, then it toggles, which is kind of random result since the checkbox doesn't show whether it was true before.
So, I know, it's a simple thing, I have done it before, I looked there, but right now, the world seems to end at a wall and I just don't see it. Help please?

J.
Jabberwocky
Retired
 
Posts: 1319
Joined: Sat Mar 22, 2014 7:36 pm
Callsign: JWOCKY
Version: 3.0.0
OS: Ubuntu 14.04

Re: Checkbox not checked ...  

Postby Gijs » Tue Nov 18, 2014 10:04 pm

There's a superfluous S in the top property, so you're toggling a different property than what you're using to display the check mark;-)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9447
Joined: Tue Jul 03, 2007 2:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Checkbox not checked ...

Postby Jabberwocky » Tue Nov 18, 2014 10:10 pm

Gaaaaaaah, I looked for <live>, I looked whether all brackets were closed ... only I missed that S ... thanks a lot, Gijs!
Jabberwocky
Retired
 
Posts: 1319
Joined: Sat Mar 22, 2014 7:36 pm
Callsign: JWOCKY
Version: 3.0.0
OS: Ubuntu 14.04


Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests