Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Talk:Bindings

From FlightGear wiki
Jump to: navigation, search

How do <command>property-set</command> and <command>property-assign</command> (used in the CDU) differ? --Hcc23 22:55, 1 December 2010 (UTC)




Hi Hcc23,

welcome on board :-)

Even if you should not subscribe to the developers mailing list, make sure to still check out the forums - let us know if you have any questions. --Hooray 23:42, 1 December 2010 (UTC)

Out of date?

Hi Hooray,

Could you indicate wich part is out of date? Not complete is something different than out of date. As far as I'm aware the content of the article is mostly/completely correct.

Gijs 15:11, 29 May 2013 (UTC)

incomplete and thus not up-to-date --Hooray 15:21, 29 May 2013 (UTC)
Still there's a big difference between the two (when considering the template text), so I've created a special {{incomplete}} template. This should also help wiki contributors see where their help is most needed (out dated/faulty documentation is worse than no documentation) ;-)
Gijs 15:50, 29 May 2013 (UTC)
Yes, thanks - we had quite an editing war there, lots of conflicts because I was doing the same thing. I have reverted my changes now, are you going to add an optional argument to the template?--Hooray 15:51, 29 May 2013 (UTC)

This could be more generic

I note that the commands can be used both when defining bindings in xml files and when programming in nasal, so why not make this more generic and just list the commands and the named parameters and then have a section in the beginning (or maybe the end) with examples on how to use commands both for bindings and in Nasal?

I volunteer to do that, though I might need some help with one or two small Nasal snippets.

In addition it might be a good idea to add most if not all bindings in flightgear/src/Main/fg_commands.cxx. (I am very grateful for the commented code there.)

Finally, can the commands be used for more things in XML files than bindings?

Johan G (Talk | contribs) 18:22, 26 August 2014 (UTC)

fgcommand() Nasal bindings

I had a lot of trouble getting property-cycle to work, so here is some working code:

  var states = props.Node.new ({
    "property": "/instrumentation/clock/chronograph-state",
    "value": ["running", "stopped", "reset"]
  });

  fgcommand("property-cycle", states);

It would seem that the props.node hash uses the name of the XML tags as strings for keys, and that multiple values have to be a vector. It literally took several hours to first trying to find any docs on what props.Node.new() would expect, and then after giving up since I could not make heads or tails about $FGDATA/Nasal/props.nas, go for trial and error with the Nasal console in spite of the sparse debugging output.

A bit frustrating. :-\

Johan G (Talk | contribs) 18:48, 8 January 2015 (UTC)