RE: [flexcoders] Create variables dynamic in Flex 2

2006-08-05 Thread Tracy Spratt












Bracket notation works on both sides of an
_expression_:

this[myVar_+i].someProperty =
someValue;

someVar = this[myVar_+i].someProperty;



Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tom Ortega
Sent: Wednesday, August 02, 2006
11:54 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Create
variables dynamic in Flex 2











What
about the opposite?

I want to find a property value of a dynamically named var. I.e. what if
later in the code, i once again looped but instead of:
var myVar_i:String = new String();



o[myVar_ + i] = new String();

I wanted to do:
myVar_+i.someProperty = someValue;
or
someVar = myVar_+i.someProperty

Thanks,
Tom







On 7/26/06, JesterXL
[EMAIL PROTECTED]n.com
wrote:











Make the class dynamic or use an object.

var o:Object = {};






for (var i:uint=0; i == 10; i++)
{
var myVar_i:String = new String();





o[myVar_ + i] = new String();
}

Or:

package
{
dynamic public class Flexible
{
publid function Flexible()
{
}
}
}

var a:Flexible = new Flexible();
a[cow + i] = new String();







- Original Message - 
From: Artur Kordowski [EMAIL PROTECTED]de
To: [EMAIL PROTECTED]ups.com





Sent: Wednesday, July 26,
2006 10:24 AM
Subject: RE: [flexcoders] Create variables dynamic in Flex 2

But i dont want to use an array. I would like to create those
vars on the
fly.

Artur

-Original Message-
From: [EMAIL PROTECTED]ups.com [mailto: [EMAIL PROTECTED]ups.com]
On
Behalf Of Paul Andrews
Sent: Wednesday, July 26, 2006 4:07 PM
To: [EMAIL PROTECTED]ups.com
Subject: Re: [flexcoders] Create variables dynamic in Flex 2

- Original Message -
From: Paul Andrews [EMAIL PROTECTED]com
To: [EMAIL PROTECTED]ups.com
Sent: Wednesday, July 26, 2006 3:04 PM
Subject: Re: [flexcoders] Create variables dynamic in Flex 2

 - Original Message - 
 From: Artur Kordowski [EMAIL PROTECTED]de
 To: [EMAIL PROTECTED]ups.com
 Sent: Wednesday, July 26, 2006 2:58 PM
 Subject: [flexcoders] Create variables dynamic in Flex 2


 How can I create in a loop variables dynamicly?
 Like this:

 for (var i:uint=0; i == 10; i++)
 {
 var myVar_i:String = new String();
 }

 Any idea?

 var myVar:Array = new Array();
 for (var i:uint=0; i == 10; i++)
 {
 myVar[i] = new String();
 }






 Artur



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt

 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com

 Yahoo! Groups Links









 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt

 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com

 Yahoo! Groups Links









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links



























__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






[flexcoders] Create variables dynamic in Flex 2

2006-07-26 Thread Artur Kordowski
How can I create in a loop variables dynamicly?
Like this:
 
for (var i:uint=0; i == 10; i++)
{
 var myVar_i:String = new String();
}
 
Any idea?
 
 
Artur


 Yahoo! Groups Sponsor ~-- 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/7EuRwD/fOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 
attachment: winmail.dat

Re: [flexcoders] Create variables dynamic in Flex 2

2006-07-26 Thread Paul Andrews
- Original Message - 
From: Artur Kordowski [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 26, 2006 2:58 PM
Subject: [flexcoders] Create variables dynamic in Flex 2


 How can I create in a loop variables dynamicly?
 Like this:

 for (var i:uint=0; i == 10; i++)
 {
 var myVar_i:String = new String();
 }

 Any idea?

var myVar:Array = new Array();
for (var i:uint=0; i == 10; i++)
{
myVar[i]  = new String();
}






 Artur



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links




 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Create variables dynamic in Flex 2

2006-07-26 Thread Paul Andrews

- Original Message - 
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 26, 2006 3:04 PM
Subject: Re: [flexcoders] Create variables dynamic in Flex 2


 - Original Message - 
 From: Artur Kordowski [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, July 26, 2006 2:58 PM
 Subject: [flexcoders] Create variables dynamic in Flex 2


 How can I create in a loop variables dynamicly?
 Like this:

 for (var i:uint=0; i == 10; i++)
 {
 var myVar_i:String = new String();
 }

 Any idea?

 var myVar:Array = new Array();
 for (var i:uint=0; i == 10; i++)

Oops..  for (var i:uint=0; i 10; i++)

 {
 myVar[i]  = new String();
 }






 Artur



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links









 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links







 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Create variables dynamic in Flex 2

2006-07-26 Thread Paul Andrews

- Original Message - 
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 26, 2006 3:04 PM
Subject: Re: [flexcoders] Create variables dynamic in Flex 2


 - Original Message - 
 From: Artur Kordowski [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, July 26, 2006 2:58 PM
 Subject: [flexcoders] Create variables dynamic in Flex 2


 How can I create in a loop variables dynamicly?
 Like this:

 for (var i:uint=0; i == 10; i++)
 {
 var myVar_i:String = new String();
 }

 Any idea?

 var myVar:Array = new Array();
 for (var i:uint=0; i == 10; i++)
 {
 myVar[i]  = new String();
 }






 Artur



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links









 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links







 




 Yahoo! Groups Sponsor ~-- 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/7EuRwD/fOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Create variables dynamic in Flex 2

2006-07-26 Thread Artur Kordowski
But i dont want to use an array. I would like to create those vars on the
fly.

Artur 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Andrews
Sent: Wednesday, July 26, 2006 4:07 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Create variables dynamic in Flex 2


- Original Message -
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 26, 2006 3:04 PM
Subject: Re: [flexcoders] Create variables dynamic in Flex 2


 - Original Message - 
 From: Artur Kordowski [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, July 26, 2006 2:58 PM
 Subject: [flexcoders] Create variables dynamic in Flex 2


 How can I create in a loop variables dynamicly?
 Like this:

 for (var i:uint=0; i == 10; i++)
 {
 var myVar_i:String = new String();
 }

 Any idea?

 var myVar:Array = new Array();
 for (var i:uint=0; i == 10; i++)
 {
 myVar[i]  = new String();
 }






 Artur



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links









 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links







 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




 Yahoo! Groups Sponsor ~-- 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/3EuRwD/bOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Create variables dynamic in Flex 2

2006-07-26 Thread JesterXL
Make the class dynamic or use an object.

var o:Object = {};
for (var i:uint=0; i == 10; i++)
{
var myVar_i:String = new String();
o[myVar_ + i] = new String();
}

Or:

package
{
dynamic public class Flexible
{
publid function Flexible()
{
}
}
}

var a:Flexible = new Flexible();
a[cow + i] = new String();


- Original Message - 
From: Artur Kordowski [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 26, 2006 10:24 AM
Subject: RE: [flexcoders] Create variables dynamic in Flex 2


But i dont want to use an array. I would like to create those vars on the
fly.

Artur

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Andrews
Sent: Wednesday, July 26, 2006 4:07 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Create variables dynamic in Flex 2


- Original Message -
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 26, 2006 3:04 PM
Subject: Re: [flexcoders] Create variables dynamic in Flex 2


 - Original Message - 
 From: Artur Kordowski [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, July 26, 2006 2:58 PM
 Subject: [flexcoders] Create variables dynamic in Flex 2


 How can I create in a loop variables dynamicly?
 Like this:

 for (var i:uint=0; i == 10; i++)
 {
 var myVar_i:String = new String();
 }

 Any idea?

 var myVar:Array = new Array();
 for (var i:uint=0; i == 10; i++)
 {
 myVar[i]  = new String();
 }






 Artur



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links









 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links













--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links








 Yahoo! Groups Sponsor ~-- 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/TktRrD/gOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Create variables dynamic in Flex 2

2006-07-26 Thread Paul Andrews
- Original Message - 
From: Artur Kordowski [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 26, 2006 3:24 PM
Subject: RE: [flexcoders] Create variables dynamic in Flex 2


 But i dont want to use an array. I would like to create those vars on the
 fly.

I don't really see what the difference would be apart from the syntax. 
Referring to myVar1..  myVar10 will still mean that you have to fabricate 
the name dynamically. There's really no difference between doing that and 
having myVar[1].. myVar[10], or the altenatives mentioned by others.

Why do you want to do this specifically this way?

Paul


 Artur

 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Paul Andrews
 Sent: Wednesday, July 26, 2006 4:07 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Create variables dynamic in Flex 2


 - Original Message -
 From: Paul Andrews [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, July 26, 2006 3:04 PM
 Subject: Re: [flexcoders] Create variables dynamic in Flex 2


 - Original Message - 
 From: Artur Kordowski [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, July 26, 2006 2:58 PM
 Subject: [flexcoders] Create variables dynamic in Flex 2


 How can I create in a loop variables dynamicly?
 Like this:

 for (var i:uint=0; i == 10; i++)
 {
 var myVar_i:String = new String();
 }

 Any idea?

 var myVar:Array = new Array();
 for (var i:uint=0; i == 10; i++)
 {
 myVar[i]  = new String();
 }






 Artur



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links









 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links













 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links









 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links







 




 Yahoo! Groups Sponsor ~-- 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/3EuRwD/bOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/