* Roy Vegard Ovesen -- Friday 06 April 2007:
> As far as I can see the aircraft.light class loops through the
> pattern forever. 

Yes, until it's turned off. Then the loop is actually stopped and
doesn't consume any cycles. You could let a timer turn the light
off after the desired time.



> I assume that you are the author of aircraft.nas. I want to add
> a new method to the light class where one can go through a pattern
> an abritrary number of times. Or is that already possible somehow?

Yes, and no, it's not. Adding an optional number of cycles can
certainly be done.



> I see that aircraft.light uses typechecking and stuff to extract the correct 
> arguments. Wouldn't this be much simpler with named arguments instead of 
> arg[]?

Simpler, yes, though not much. What the code does is similar to
overloading in C++. Two possible argument sets to the same function.
Named args alone wouldn't help here at all. What would help is named
args with default values. But that only works if they are always
used in order, which is not the case here.

m.

-------------------------------------------------------------------------
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

Reply via email to