[flexcoders] With statement in Pascal what is it in AS3

2008-02-25 Thread boy_trike
In Delphi, I can type: with CLASSNAME property1 = xxx property2 = yyy etc. without having to type CLASSNAME.property1 = xxx Is there a similar shortcut in AS3 to save my delicate fingers from excessive typing? Thanks Bruce

Re: [flexcoders] With statement in Pascal what is it in AS3

2008-02-25 Thread Troy Gilbert
Is there a similar shortcut in AS3 to save my delicate fingers from excessive typing? Yes, it's the with keyword... clever, huh? ;-) Though, it's generally avoided because the scoping issues can be unclear when reading the code. Troy.

Re: [flexcoders] With statement in Pascal what is it in AS3

2008-02-25 Thread Maciek Sakrejda
Right. I've always been wary of the with construct (VB.NET, which I used to work in, has it), but it can be used rather elegantly: private function populateNode(d:DataSprite):Boolean { var p:Particle = d.props.particle; if (p == null) { d.props.particle = (p =