[flexcoders] Wha kinds of object are in this Array?
Hi All, What kinds of object are in this Array? var zingerManufacturingData = [ {Month: January '03, Widgets:885202, Blinkies: 184454, monthIdx:1 }, {Month: February '03, Widgets:683392, Blinkies: 945385, monthIdx:2 }, {Month: December '03, Widgets:800254, Blinkies: 826652, monthIdx:12 } ]; And how can I put a variable instead of Month, Widgets ? Thank you, Dzafer 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 the Yahoo! Terms of Service.
RE: [flexcoders] Wha kinds of object are in this Array?
This array contains plain objects. You can access any of the properties like this zingerManufacturingData[0].Month, zingerManufacturingData[1].Widget, etc. To change the variable names, do this, var zingerManufacturingData = [ {differentVar: January '03, anotherVar:885202, Blinkies: 184454, monthIdx:1 }, {differentVar: February '03, anotherVar:683392, Blinkies: 945385, monthIdx:2 }, {differentVar: December '03, anotherVar:800254, Blinkies: 826652, monthIdx:12 } ]; In that example Month was changed to differentVar and Widgets was changed to anotherVar. Hope that is what you were looking for J From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dzafer Sent: Monday, April 18, 2005 6:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Wha kinds of object are in this Array? Hi All, What kinds of object are in this Array? var zingerManufacturingData = [ {Month: January '03, Widgets:885202, Blinkies: 184454, monthIdx:1 }, {Month: February '03, Widgets:683392, Blinkies: 945385, monthIdx:2 }, {Month: December '03, Widgets:800254, Blinkies: 826652, monthIdx:12 } ]; And how can I put a variable instead of Month, Widgets ? Thank you, Dzafer 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 the Yahoo! Terms of Service.
RE: [flexcoders] Wha kinds of object are in this Array?
Hi there, If you put differentVar and displaying into a datagrid he will display differentVar What I want to do is this one : Var myString:String; myString = FistrName; and put myString has the first label . Tnx! From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mercer, Dustin Sent: Monday, April 18, 2005 3:30 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Wha kinds of object are in this Array? This array contains plain objects. You can access any of the properties like this zingerManufacturingData[0].Month, zingerManufacturingData[1].Widget, etc. To change the variable names, do this, var zingerManufacturingData = [ {differentVar: January '03, anotherVar:885202, Blinkies: 184454, monthIdx:1 }, {differentVar: February '03, anotherVar:683392, Blinkies: 945385, monthIdx:2 }, {differentVar: December '03, anotherVar:800254, Blinkies: 826652, monthIdx:12 } ]; In that example Month was changed to differentVar and Widgets was changed to anotherVar. Hope that is what you were looking for J From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dzafer Sent: Monday, April 18, 2005 6:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Wha kinds of object are in this Array? Hi All, What kinds of object are in this Array? var zingerManufacturingData = [ {Month: January '03, Widgets:885202, Blinkies: 184454, monthIdx:1 }, {Month: February '03, Widgets:683392, Blinkies: 945385, monthIdx:2 }, {Month: December '03, Widgets:800254, Blinkies: 826652, monthIdx:12 } ]; And how can I put a variable instead of Month, Widgets ? Thank you, Dzafer 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 the Yahoo! Terms of Service.
RE: [flexcoders] Wha kinds of object are in this Array?
I am not sure if this is what you are asking but here goes: Var myString:String; myString = FistrName; var zingerManufacturingData = [ {differentVar : myString, anotherVar:885202, Blinkies: 184454, monthIdx:1}, {differentVar : myString, anotherVar:683392, Blinkies: 945385, monthIdx:2}, {differentVar : myString, anotherVar:800254, Blinkies: 826652, monthIdx:12} ]; From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dzafer Sent: Monday, April 18, 2005 7:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Wha kinds of object are in this Array? Hi there, If you put differentVar and displaying into a datagrid he will display differentVar What I want to do is this one : Var myString:String; myString = FistrName; and put myString has the first label . Tnx! From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mercer, Dustin Sent: Monday, April 18, 2005 3:30 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Wha kinds of object are in this Array? This array contains plain objects. You can access any of the properties like this zingerManufacturingData[0].Month, zingerManufacturingData[1].Widget, etc. To change the variable names, do this, var zingerManufacturingData = [ {differentVar: January '03, anotherVar:885202, Blinkies: 184454, monthIdx:1 }, {differentVar: February '03, anotherVar:683392, Blinkies: 945385, monthIdx:2 }, {differentVar: December '03, anotherVar:800254, Blinkies: 826652, monthIdx:12 } ]; In that example Month was changed to differentVar and Widgets was changed to anotherVar. Hope that is what you were looking for J From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dzafer Sent: Monday, April 18, 2005 6:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Wha kinds of object are in this Array? Hi All, What kinds of object are in this Array? var zingerManufacturingData = [ {Month: January '03, Widgets:885202, Blinkies: 184454, monthIdx:1 }, {Month: February '03, Widgets:683392, Blinkies: 945385, monthIdx:2 }, {Month: December '03, Widgets:800254, Blinkies: 826652, monthIdx:12 } ]; And how can I put a variable instead of Month, Widgets ? Thank you, Dzafer 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 the Yahoo! Terms of Service.
Re: [flexcoders] Wha kinds of object are in this Array?
On 4/18/05, Mercer, Dustin [EMAIL PROTECTED] wrote: I am not sure if this is what you are asking but here goes: Var myString:String; myString = FistrName; var zingerManufacturingData = [ {differentVar : myString,anotherVar:885202, Blinkies: 184454, monthIdx:1}, No, he wants the names to be dynamic, not the values. I think the only way to do that is by building it, er, dynamically? zingerManufacturingData = [ {}, {}, {} ]; // 3 objects zingerManufacturingData[0][myString] = myValue; zingerManufacturingData[0][myString2] = myValue2; zingerManufacturingData[1][myString] = myValue_1; zingerManufacturingData[1][myString2] = myValue2_1; That way. -- [EMAIL PROTECTED] http://manish.revise.org/ 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/