Re: [flexcoders] DataBinding Question
Thanks Tracey this is what I'd discovered. I hadn't realised that: mx:whatever dataProvider={arrDataSource} / is different to: function setSomething() { myComponent.dataProvider = arrDataSource } So I'm assuming that basically the {} in mxml does all the event wiring to actually Bind the dataProvider whereas just setting the dataProvider in actionscript just sets it the once. Thanks, Dan On 11/03/2008, Tracy Spratt [EMAIL PROTECTED] wrote: …My ArrayCollection is really only going to be set once… Don't bind. Set the dataProvider explicitly. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *DannyT *Sent:* Tuesday, March 11, 2008 5:15 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] DataBinding Question I have a DataModel singleton which contains an arrayCollection to which I am binding a repeater. My DataModel also has a selectedItem property which I am binding another component to. When I update my selectedItem my repeater seems to be refreshing it's bind (the repeater's items contain children that are disappearing when I set the selectedItem). Is it expected that all properties of a class will refresh their bindings when any property changes? My ArrayCollection is really only going to be set once so I'd almost like to populate my repeater then 'break' that bind if that's possible? Or if anyone can suggest a better solution I'd be very grateful. Dan -- http://danny-t.co.uk -- http://danny-t.co.uk
RE: [flexcoders] DataBinding Question
...My ArrayCollection is really only going to be set once... Don't bind. Set the dataProvider explicitly. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of DannyT Sent: Tuesday, March 11, 2008 5:15 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataBinding Question I have a DataModel singleton which contains an arrayCollection to which I am binding a repeater. My DataModel also has a selectedItem property which I am binding another component to. When I update my selectedItem my repeater seems to be refreshing it's bind (the repeater's items contain children that are disappearing when I set the selectedItem). Is it expected that all properties of a class will refresh their bindings when any property changes? My ArrayCollection is really only going to be set once so I'd almost like to populate my repeater then 'break' that bind if that's possible? Or if anyone can suggest a better solution I'd be very grateful. Dan -- http://danny-t.co.uk http://danny-t.co.uk
RE: [flexcoders] databinding question
Nevermind, I just found a past post from Matt saying databinding can only be done from MXML right now and not programmatically. Sorry for the post! robert l. brueckmann senior web developer merlin securities 595 madison avenue new york,ny 10022 p: 212.822.4821 f: 212.822.4820 From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Robert Brueckmann Sent: Tuesday, August 02, 2005 4:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] databinding question Quick question...why are these different: merlin:ReportingDatesPanel width=100% height=100% portfolio={selectedPortfolio} / Versus: mainContent.createChild(ReportingDatesPanel, , {width: 100%, height: 100%, portfolio: selectedPortfolio}); When the selectedPortfolio object changes in the main app with the MXML in first example above, the custom component recognizes the change in the selectedPortfolio object and performs the correct action. If I have the main application dynamically create the custom component with the code in the 2nd example above, if the selectedPortfolio object changes, the dynamically created custom component does not see that change and none of the actions that I want to take place, actually take place. Im guessing this is a databinding issueam I supposed to set the portfolio attribute differently to catch changes in this object when dynamically creating the custom component? Any help is greatly appreciated. Thanks, Rob robert l. brueckmann senior web developer merlin securities 595 madison avenue new york, ny 10022 p: 212.822.4821 f: 212.822.4820 This message contains information fromMerlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission. Merlin Securities, LLC is a registered broker-dealer. Services offered throughMerlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed byMerlin Securities, LLCand may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security. This message contains information fromMerlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission. Merlin Securities, LLC is a registered broker-dealer. Services offered throughMerlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed byMerlin Securities, LLCand may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security. -- 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 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: [flexcoders] databinding question
Its probably because of the way they are instantiated. dispatchEvent() is a mix-in from UIEventDispatcher. You might try adding ChangeEvent to the component once it is created. Just a thought. Hey, Im at 11 Madison Ave. Regards, Rob Rusher RIA Consultant Macromedia Certified Flex Instructor e:[EMAIL PROTECTED] c:303.885.7044 im:robrusher From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Robert Brueckmann Sent: Tuesday, August 02, 2005 4:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] databinding question Quick question...why are these different: merlin:ReportingDatesPanel width=100% height=100% portfolio={selectedPortfolio} / Versus: mainContent.createChild(ReportingDatesPanel, , {width: 100%, height: 100%, portfolio: selectedPortfolio}); When the selectedPortfolio object changes in the main app with the MXML in first example above, the custom component recognizes the change in the selectedPortfolio object and performs the correct action. If I have the main application dynamically create the custom component with the code in the 2nd example above, if the selectedPortfolio object changes, the dynamically created custom component does not see that change and none of the actions that I want to take place, actually take place. Im guessing this is a databinding issueam I supposed to set the portfolio attribute differently to catch changes in this object when dynamically creating the custom component? Any help is greatly appreciated. Thanks, Rob robert l. brueckmann senior web developer merlin securities 595 madison avenue new york, ny 10022 p: 212.822.4821 f: 212.822.4820 This message contains information fromMerlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission. Merlin Securities, LLC is a registered broker-dealer. Services offered throughMerlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed byMerlin Securities, LLCand may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security. -- 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 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: [flexcoders] databinding question
Hi, Databinding is a special beast in flex, and is set up in mxml-as compiling The compiler needs the metadata to figure out what events it has to listen to for each property (or perhaps just use getters setters). It then sets up a complex mechanism of watchers and stuff to make binding happen. This is the reason why it is only supported in mxml for now. If you want the same functionality on runtime you have some choices: - use the old flash binding api ( not possible I assume ) - create your own - wait for as2lib's future release. I'll be donating a quite powerful databinding framework soon (well, not that soon if work keeps me this busy ) it is flex compatible, supports chains and different types of watchers. Best, Aldo PD: Sorry for the delay Simon, I've been busy as hell at work. On 8/2/05, Rob Rusher [EMAIL PROTECTED] wrote: It's probably because of the way they are instantiated. dispatchEvent() is a mix-in from UIEventDispatcher. You might try adding ChangeEvent to the component once it is created. Just a thought. Hey, I'm at 11 Madison Ave. Regards, Rob Rusher RIA Consultant Macromedia Certified Flex Instructor e:[EMAIL PROTECTED] c:303.885.7044 im:robrusher From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Brueckmann Sent: Tuesday, August 02, 2005 4:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] databinding question Quick question...why are these different: merlin:ReportingDatesPanel width=100% height=100% portfolio={selectedPortfolio} / Versus: mainContent.createChild(ReportingDatesPanel, , {width: 100%, height: 100%, portfolio: selectedPortfolio}); When the selectedPortfolio object changes in the main app with the MXML in first example above, the custom component recognizes the change in the selectedPortfolio object and performs the correct action. If I have the main application dynamically create the custom component with the code in the 2nd example above, if the selectedPortfolio object changes, the dynamically created custom component does not see that change and none of the actions that I want to take place, actually take place. I'm guessing this is a databinding issue…am I supposed to set the portfolio attribute differently to catch changes in this object when dynamically creating the custom component? Any help is greatly appreciated. Thanks, Rob robert l. brueckmann senior web developer merlin securities 595 madison avenue new york, ny 10022 p: 212.822.4821 f: 212.822.4820 This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission. Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security. -- 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 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. -- : Aldo Bucchi : mobile (56) 8 429 8300 Yahoo! Groups Sponsor ~-- font face=arial size=-1a href=http://us.ard.yahoo.com/SIG=12h7uikql/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123028146/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life - brought to you by One Economy/a./font ~- -- 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] *
RE: [flexcoders] databinding question
Gotchya on both accounts! Thanks for the feedback guys! robert l. brueckmann senior web developer merlin securities 595 madison avenue new york, ny 10022 p: 212.822.4821 f: 212.822.4820 -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Aldo Bucchi Sent: Tuesday, August 02, 2005 6:16 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] databinding question Hi, Databinding is a special beast in flex, and is set up in mxml-as compiling The compiler needs the metadata to figure out what events it has to listen to for each property (or perhaps just use getters setters). It then sets up a complex mechanism of watchers and stuff to make binding happen. This is the reason why it is only supported in mxml for now. If you want the same functionality on runtime you have some choices: - use the old flash binding api ( not possible I assume ) - create your own - wait for as2lib's future release. I'll be donating a quite powerful databinding framework soon (well, not that soon if work keeps me this busy ) it is flex compatible, supports chains and different types of watchers. Best, Aldo PD: Sorry for the delay Simon, I've been busy as hell at work. On 8/2/05, Rob Rusher [EMAIL PROTECTED] wrote: It's probably because of the way they are instantiated. dispatchEvent() is a mix-in from UIEventDispatcher. You might try adding ChangeEvent to the component once it is created. Just a thought. Hey, I'm at 11 Madison Ave. Regards, Rob Rusher RIA Consultant Macromedia Certified Flex Instructor e:[EMAIL PROTECTED] c:303.885.7044 im:robrusher From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Brueckmann Sent: Tuesday, August 02, 2005 4:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] databinding question Quick question...why are these different: merlin:ReportingDatesPanel width=100% height=100% portfolio={selectedPortfolio} / Versus: mainContent.createChild(ReportingDatesPanel, , {width: 100%, height: 100%, portfolio: selectedPortfolio}); When the selectedPortfolio object changes in the main app with the MXML in first example above, the custom component recognizes the change in the selectedPortfolio object and performs the correct action. If I have the main application dynamically create the custom component with the code in the 2nd example above, if the selectedPortfolio object changes, the dynamically created custom component does not see that change and none of the actions that I want to take place, actually take place. I'm guessing this is a databinding issue...am I supposed to set the portfolio attribute differently to catch changes in this object when dynamically creating the custom component? Any help is greatly appreciated. Thanks, Rob robert l. brueckmann senior web developer merlin securities 595 madison avenue new york, ny 10022 p: 212.822.4821 f: 212.822.4820 This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission. Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security. -- 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 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. -- : Aldo Bucchi : mobile (56) 8 429 8300 -- 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 This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you