Re: [Flightgear-devel] nasal hash question

2006-12-07 Thread Andy Ross
Josh Babcock wrote: foreach(light; lights) { propertyPath = 'some/path/'~light; # do magic to the hash lightNodes here # So that a node linked to propertyPath # with a key of light gets added to lightNodes } The hash/vector index expression is an lvalue that can be

Re: [Flightgear-devel] nasal hash question

2006-12-07 Thread Josh Babcock
Andy Ross wrote: Josh Babcock wrote: foreach(light; lights) { propertyPath = 'some/path/'~light; # do magic to the hash lightNodes here # So that a node linked to propertyPath # with a key of light gets added to lightNodes } The hash/vector index expression is an

[Flightgear-devel] nasal hash question

2006-12-06 Thread Josh Babcock
How do I populate a hash in a foreach loop? I have a vector of about a hundred object names and I want a hash of property nodes with the key for each being the object name, and the node tied to a property like so: lights = ['blinky1, 'blinky2']; turnOn = func(someNode) { # do some stuff