You shouldn't be doing that... it's bad practice. You should be using an
Array and looking items up by integer index - rather than using an
Object and looking items up by an index-containing name string --
because it's considerably more efficient.

 

The only time you should look up properties by name is when you don't
know at author time what name you'll be looking up.

 

Gordon Smith

Adobe Flex SDK Team

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Monday, March 24, 2008 5:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] What's this Called?

 

When I do this["idOfsomethingImLookingfor"]

I usually do this if I have to loop something.

So:

for (i=0; i<10; i++){
var example:Object = this["myComponent" + i]
//do some more stuff
}

I'm trying to do the same thing in .NET. I don't know what it's
called though so I'm having a hard time googling it.

Thanks,

Nate

 

Reply via email to