Re: [Junk E-Mail - MED] [flexcoders] Binding array to repeater
To use ArrayCollection it will look like this: import mx.collections.ArrayCollection; [Bindable] public var arrMdta:ArrayCollection; private function init():void { var myArray:Array = new Array(); for(var i:Number = 1; i < 100; i++) { var filePath:String = "assets/image"; if(i.toString().length == 1) filePath += "00"; if(i.toString().length == 2) filePath += "0"; filePath += i.toString() + ".jpg"; myArray.push(new Mdta(filePath)); } arrMdta = new ArrayCollection( myArray ); } Renaun --- In flexcoders@yahoogroups.com, "Jonas Windey" <[EMAIL PROTECTED]> wrote: > > Hmm, nope. This is what I tried > > > > import mx.collections.ArrayCollection; > > [Bindable] > > public var arrMdta:Array = new Array(); > > private function init():void > > { > > for(var i:Number = 1; i < 100; i++) > > { > > var filePath:String = "assets/image"; > > if(i.toString().length == 1) filePath += "00"; > > if(i.toString().length == 2) filePath += "0"; > > filePath += i.toString() + ".jpg"; > > arrMdta.push(new Mdta(filePath)); > > } > > } > > > > And in mxml > > > > > > > > Repeater: > > > > > > > > > > > > > No luck, now I don't have any items. > > > > _ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Shannon Hicks > Sent: donderdag 3 augustus 2006 16:02 > To: flexcoders@yahoogroups.com > Subject: RE: [Junk E-Mail - MED] [flexcoders] Binding array to repeater > > > > Close... that's the point of binding to an ArrayCollection... make arrMdta > into an ArrayCollection instead, and it'll work great. > > > > Shan > > > > _ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Jonas Windey > Sent: Thursday, August 03, 2006 8:42 AM > To: flexcoders@yahoogroups.com > Subject: [Junk E-Mail - MED] [flexcoders] Binding array to repeater > > Hi, > > I have a repeater with a thumbnail in it. > > Code: > > > > > > > > > In my script I have > > [Bindable] > > public var arrMdta:Array = [new Mdta("assets/image001.jpg")]; > > So far so good, I see my image (inside my thumb component there's an > mx:image, nothing fancy > > Now the harder part, I try to bind the repeater to the array (as I'm doing > here, but when I change my array, it doesn't get updated automatically. > > In my applicationComplete, I call function init(); > > private function init():void > > { > > for(var i:Number = 1; i < 100; i++) > > { > > var filePath:String = "assets/image"; > > if(i.toString().length == 1) filePath += "00"; // > just because images have filenames image001.jpg, etc > > if(i.toString().length == 2) filePath += "0"; > > filePath += i.toString() + ".jpg"; > > arrMdta.push(new Mdta(filePath)); > > } > > } > > This doesn't work, only when I put the following line: > > rptGallery.dataProvider = arrMdta; > > Why is it only working if I re-force the dataProvider? I thought that was > the point of binding my data? > > Thanks for any help, > > Jonas > > > > > Jonas Windey > > Web Developer > > T. +32 3 216 86 47 > > Pixco Interactive Division > > T. +32 3 216 86 40 > > F. +32 3 216 86 49 > > http://www.pixco. <http://www.pixco.com> com > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006 > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006 > > > > __ NOD32 1.1690 (20060803) Information __ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > -- 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: [Junk E-Mail - MED] [flexcoders] Binding array to repeater
Hmm, I tried that too, but with arrMdta.addItem() it hangs my browser. Seem I can’t add objects to an arraycollection, only arrays (and I don’t want to create an array for each item in it) Thanks though From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Tredway Sent: donderdag 3 augustus 2006 17:08 To: flexcoders@yahoogroups.com Subject: Re: [Junk E-Mail - MED] [flexcoders] Binding array to repeater set this, arrMdta, to a type of ArrayCollection not just an array.. On 8/3/06, Jonas Windey <[EMAIL PROTECTED]com> wrote: Hmm, nope. This is what I tried import mx.collections.ArrayCollection; [Bindable] public var arrMdta:Array = new Array(); private function init():void { for(var i:Number = 1; i < 100; i++) { var filePath:String = "assets/image"; if(i.toString().length == 1) filePath += "00"; if(i.toString().length == 2) filePath += "0"; filePath += i.toString() + ".jpg"; arrMdta.push(new Mdta(filePath)); } } And in mxml Repeater: No luck, now I don't have any items. From: [EMAIL PROTECTED]ups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Shannon Hicks Sent: donderdag 3 augustus 2006 16:02 To: [EMAIL PROTECTED]ups.com Subject: RE: [Junk E-Mail - MED] [flexcoders] Binding array to repeater Close... that's the point of binding to an ArrayCollection... make arrMdta into an ArrayCollection instead, and it'll work great. Shan From: [EMAIL PROTECTED]ups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Jonas Windey Sent: Thursday, August 03, 2006 8:42 AM To: [EMAIL PROTECTED]ups.com Subject: [Junk E-Mail - MED] [flexcoders] Binding array to repeater Hi, I have a repeater with a thumbnail in it. Code: In my script I have [Bindable] public var arrMdta:Array = [new Mdta("assets/image001.jpg")]; So far so good, I see my image (inside my thumb component there's an mx:image, nothing fancy Now the harder part, I try to bind the repeater to the array (as I'm doing here, but when I change my array, it doesn't get updated automatically. In my applicationComplete, I call function init(); private function init():void { for(var i:Number = 1; i < 100; i++) { var filePath:String = "assets/image"; if(i.toString().length == 1) filePath += "00"; // just because images have filenames image001.jpg, etc if(i.toString().length == 2) filePath += "0"; filePath += i.toString() + ".jpg"; arrMdta.push(new Mdta(filePath)); } } This doesn't work, only when I put the following line: rptGallery.dataProvider = arrMdta; Why is it only working if I re-force the dataProvider? I thought that was the point of binding my data? Thanks for any help, Jonas Jonas Windey Web Developer T. +32 3 216 86 47 Pixco Interactive Division T. +32 3 216 86 40 F. +32 3 216 86 49 http://www.pixco.com -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006 __ NOD32 1.1690 (20060803) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- diabetic? http://www.diabetesforums.com Albert Einstein - "It's not that I'm so smart, it's just that I stay with problems longer." __ NOD32 1.1690 (20060803) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com __._,_.___ -- 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. __,_._,___
Re: [Junk E-Mail - MED] [flexcoders] Binding array to repeater
set this, arrMdta, to a type of ArrayCollection not just an array.. On 8/3/06, Jonas Windey <[EMAIL PROTECTED]> wrote: Hmm, nope. This is what I tried import mx.collections.ArrayCollection; [Bindable] public var arrMdta:Array = new Array(); private function init():void { for(var i:Number = 1; i < 100; i++) { var filePath:String = "assets/image"; if(i.toString().length == 1) filePath += "00"; if(i.toString().length == 2) filePath += "0"; filePath += i.toString() + ".jpg"; arrMdta.push(new Mdta(filePath)); } } And in mxml Repeater: No luck, now I don't have any items. From: [EMAIL PROTECTED]ups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Shannon Hicks Sent: donderdag 3 augustus 2006 16:02 To: [EMAIL PROTECTED]ups.com Subject: RE: [Junk E-Mail - MED] [flexcoders] Binding array to repeater Close... that's the point of binding to an ArrayCollection... make arrMdta into an ArrayCollection instead, and it'll work great. Shan From: [EMAIL PROTECTED]ups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Jonas Windey Sent: Thursday, August 03, 2006 8:42 AM To: [EMAIL PROTECTED]ups.com Subject: [Junk E-Mail - MED] [flexcoders] Binding array to repeater Hi, I have a repeater with a thumbnail in it. Code: In my script I have [Bindable] public var arrMdta:Array = [new Mdta("assets/image001.jpg")]; So far so good, I see my image (inside my thumb component there's an mx:image, nothing fancy Now the harder part, I try to bind the repeater to the array (as I'm doing here, but when I change my array, it doesn't get updated automatically. In my applicationComplete, I call function init(); private function init():void { for(var i:Number = 1; i < 100; i++) { var filePath:String = "assets/image"; if(i.toString().length == 1) filePath += "00"; // just because images have filenames image001.jpg, etc if(i.toString().length == 2) filePath += "0"; filePath += i.toString() + ".jpg"; arrMdta.push(new Mdta(filePath)); } } This doesn't work, only when I put the following line: rptGallery.dataProvider = arrMdta; Why is it only working if I re-force the dataProvider? I thought that was the point of binding my data? Thanks for any help, Jonas Jonas Windey Web Developer T. +32 3 216 86 47 Pixco Interactive Division T. +32 3 216 86 40 F. +32 3 216 86 49 http://www.pixco.com -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006 __ NOD32 1.1690 (20060803) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- diabetic? http://www.diabetesforums.comAlbert Einstein - "It's not that I'm so smart, it's just that I stay with problems longer." __._,_.___ -- 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. __,_._,___
RE: [Junk E-Mail - MED] [flexcoders] Binding array to repeater
Hmm, nope. This is what I tried import mx.collections.ArrayCollection; [Bindable] public var arrMdta:Array = new Array(); private function init():void { for(var i:Number = 1; i < 100; i++) { var filePath:String = "assets/image"; if(i.toString().length == 1) filePath += "00"; if(i.toString().length == 2) filePath += "0"; filePath += i.toString() + ".jpg"; arrMdta.push(new Mdta(filePath)); } } And in mxml Repeater: No luck, now I don’t have any items. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shannon Hicks Sent: donderdag 3 augustus 2006 16:02 To: flexcoders@yahoogroups.com Subject: RE: [Junk E-Mail - MED] [flexcoders] Binding array to repeater Close... that's the point of binding to an ArrayCollection... make arrMdta into an ArrayCollection instead, and it'll work great. Shan From: [EMAIL PROTECTED]ups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jonas Windey Sent: Thursday, August 03, 2006 8:42 AM To: [EMAIL PROTECTED]ups.com Subject: [Junk E-Mail - MED] [flexcoders] Binding array to repeater Hi, I have a repeater with a thumbnail in it. Code: "{arrMdta}"> In my script I have [Bindable] public var arrMdta:Array = [new Mdta("assets/image001.jpg")]; So far so good, I see my image (inside my thumb component there’s an mx:image, nothing fancy Now the harder part, I try to bind the repeater to the array (as I’m doing here, but when I change my array, it doesn’t get updated automatically. In my applicationComplete, I call function init(); private function init():void { for(var i:Number = 1; i < 100; i++) { var filePath:String = "assets/image"; if(i.toString().length == 1) filePath += "00"; // just because images have filenames image001.jpg, etc if(i.toString().length == 2) filePath += "0"; filePath += i.toString() + ".jpg"; arrMdta.push(new Mdta(filePath)); } } This doesn’t work, only when I put the following line: rptGallery.dataProvider = arrMdta; Why is it only working if I re-force the dataProvider? I thought that was the point of binding my data? Thanks for any help, Jonas Jonas Windey Web Developer T. +32 3 216 86 47 Pixco Interactive Division T. +32 3 216 86 40 F. +32 3 216 86 49 http://www.pixco.com -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006 __ NOD32 1.1690 (20060803) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com __._,_.___ -- 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. __,_._,___
RE: [Junk E-Mail - MED] [flexcoders] Binding array to repeater
Close... that's the point of binding to an ArrayCollection... make arrMdta into an ArrayCollection instead, and it'll work great. Shan From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jonas WindeySent: Thursday, August 03, 2006 8:42 AMTo: flexcoders@yahoogroups.comSubject: [Junk E-Mail - MED] [flexcoders] Binding array to repeater Hi, I have a repeater with a thumbnail in it. Code: In my script I have [Bindable] public var arrMdta:Array = [new Mdta("assets/image001.jpg")]; So far so good, I see my image (inside my thumb component there’s an mx:image, nothing fancy Now the harder part, I try to bind the repeater to the array (as I’m doing here, but when I change my array, it doesn’t get updated automatically. In my applicationComplete, I call function init(); private function init():void { for(var i:Number = 1; i < 100; i++) { var filePath:String = "assets/image"; if(i.toString().length == 1) filePath += "00"; // just because images have filenames image001.jpg, etc if(i.toString().length == 2) filePath += "0"; filePath += i.toString() + ".jpg"; arrMdta.push(new Mdta(filePath)); } } This doesn’t work, only when I put the following line: rptGallery.dataProvider = arrMdta; Why is it only working if I re-force the dataProvider? I thought that was the point of binding my data? Thanks for any help, Jonas Jonas Windey Web Developer T. +32 3 216 86 47 Pixco Interactive Division T. +32 3 216 86 40 F. +32 3 216 86 49 http://www.pixco.com --No virus found in this incoming message.Checked by AVG Free Edition.Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006 __._,_.___ -- 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. __,_._,___ -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006