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 lvalue that can be assigned as > well as inspected. So it's just: > > foreach(light; lights) { lightNodes[light] = propertyPath; } > > Andy >
Yeah, I got confused by another error I made. The problem was that I was trying to reference a vector like a hash. Once I defined the hash properly it started to work. I just forgot to say so here :( Josh ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel