[flexcoders] Re: Trees, DataProviders and dynamic screen updates
Thanks, Tracy. What I meant was that I was adding Objects like { object:myObject } to ArrayCollection - where myObject was an instance of a proxy class - and whose properties were getting changed. I have now gone to a slightly different scheme, adding Objects like { object:mpObject, value:myObject.value } - and when 'value' property changes, I iterate through ArrayCollection, looking for match on 'object' - and, when I find that, I set 'value' to new myObject.value. This seems to trigger necessary dispatch and Tree's rendering updates. Thanks again for your help. =Eric --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: ...when the items referenced by the ArrayCollection change... How is that happening? The items... change? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cooper Sent: Wednesday, July 23, 2008 6:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Trees, DataProviders and dynamic screen updates I am adding to and removing from ArrayCollection - and when I do that, the Tree items refresh and are current. But when the items referenced by the ArrayCollection change, I am doing nothing. Is there a way to touch the ArrayCollection so as to prompt Tree to reload (or reevaluate) its dataProvider and call labelFunction to generate updated rendering? Or is the preferred way to step walk through ArrayCollection and modify (in place) the changed objects? Thanks. =Eric --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: If you use the ArrayCollection API to make the updates to the dataProvider, the changes should automatically reflect in the UI. How are you updating the ArrayCollection items? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Eric Cooper Sent: Wednesday, July 23, 2008 3:53 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Trees, DataProviders and dynamic screen updates Hi, I am trying to display changes in state for proxy objects (where real state exists on a server). I have defined a Tree and set its dataProvider to be an ArrayCollection. I have tried having this be an array of references to actual proxy object and also as array of dynamically created Objects (of form {name:foo.toString(), object:foo} Server-side events result in client being notified that properties in proxy object have changed. I would like these changes in proxy object properties to propagate through the Tree's items. I have searched docs and this forum, but not found anything that addresses this issue. At the same time, I suspect that this is something that has been discussed - and may simply involve setting some flag on the Tree or the DataProvider... Thanks for any help! =Eric
RE: [flexcoders] Re: Trees, DataProviders and dynamic screen updates
That sounds like unnecessary work. Again, when you say and whose properties were getting changed, how are they getting changed? By simple assignment? If so, then you can call the ArrayCollection.itemUpdated() method. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cooper Sent: Thursday, July 24, 2008 4:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Trees, DataProviders and dynamic screen updates Thanks, Tracy. What I meant was that I was adding Objects like { object:myObject } to ArrayCollection - where myObject was an instance of a proxy class - and whose properties were getting changed. I have now gone to a slightly different scheme, adding Objects like { object:mpObject, value:myObject.value } - and when 'value' property changes, I iterate through ArrayCollection, looking for match on 'object' - and, when I find that, I set 'value' to new myObject.value. This seems to trigger necessary dispatch and Tree's rendering updates. Thanks again for your help. =Eric --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: ...when the items referenced by the ArrayCollection change... How is that happening? The items... change? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Eric Cooper Sent: Wednesday, July 23, 2008 6:24 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Trees, DataProviders and dynamic screen updates I am adding to and removing from ArrayCollection - and when I do that, the Tree items refresh and are current. But when the items referenced by the ArrayCollection change, I am doing nothing. Is there a way to touch the ArrayCollection so as to prompt Tree to reload (or reevaluate) its dataProvider and call labelFunction to generate updated rendering? Or is the preferred way to step walk through ArrayCollection and modify (in place) the changed objects? Thanks. =Eric --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: If you use the ArrayCollection API to make the updates to the dataProvider, the changes should automatically reflect in the UI. How are you updating the ArrayCollection items? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Eric Cooper Sent: Wednesday, July 23, 2008 3:53 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Trees, DataProviders and dynamic screen updates Hi, I am trying to display changes in state for proxy objects (where real state exists on a server). I have defined a Tree and set its dataProvider to be an ArrayCollection. I have tried having this be an array of references to actual proxy object and also as array of dynamically created Objects (of form {name:foo.toString(), object:foo} Server-side events result in client being notified that properties in proxy object have changed. I would like these changes in proxy object properties to propagate through the Tree's items. I have searched docs and this forum, but not found anything that addresses this issue. At the same time, I suspect that this is something that has been discussed - and may simply involve setting some flag on the Tree or the DataProvider... Thanks for any help! =Eric
[flexcoders] Re: Trees, DataProviders and dynamic screen updates
I am adding to and removing from ArrayCollection - and when I do that, the Tree items refresh and are current. But when the items referenced by the ArrayCollection change, I am doing nothing. Is there a way to touch the ArrayCollection so as to prompt Tree to reload (or reevaluate) its dataProvider and call labelFunction to generate updated rendering? Or is the preferred way to step walk through ArrayCollection and modify (in place) the changed objects? Thanks. =Eric --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: If you use the ArrayCollection API to make the updates to the dataProvider, the changes should automatically reflect in the UI. How are you updating the ArrayCollection items? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cooper Sent: Wednesday, July 23, 2008 3:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Trees, DataProviders and dynamic screen updates Hi, I am trying to display changes in state for proxy objects (where real state exists on a server). I have defined a Tree and set its dataProvider to be an ArrayCollection. I have tried having this be an array of references to actual proxy object and also as array of dynamically created Objects (of form {name:foo.toString(), object:foo} Server-side events result in client being notified that properties in proxy object have changed. I would like these changes in proxy object properties to propagate through the Tree's items. I have searched docs and this forum, but not found anything that addresses this issue. At the same time, I suspect that this is something that has been discussed - and may simply involve setting some flag on the Tree or the DataProvider... Thanks for any help! =Eric
[flexcoders] Re: Trees, DataProviders and dynamic screen updates
I am adding to and removing from ArrayCollection - and when I do that, the Tree items refresh and are current. But when the items referenced by the ArrayCollection change, I am doing nothing. Is there a way to touch the ArrayCollection so as to prompt Tree to reload (or reevaluate) its dataProvider and call labelFunction to generate updated rendering? Or is the preferred way to step walk through ArrayCollection and modify (in place) the changed objects? Thanks. =Eric --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: If you use the ArrayCollection API to make the updates to the dataProvider, the changes should automatically reflect in the UI. How are you updating the ArrayCollection items? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cooper Sent: Wednesday, July 23, 2008 3:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Trees, DataProviders and dynamic screen updates Hi, I am trying to display changes in state for proxy objects (where real state exists on a server). I have defined a Tree and set its dataProvider to be an ArrayCollection. I have tried having this be an array of references to actual proxy object and also as array of dynamically created Objects (of form {name:foo.toString(), object:foo} Server-side events result in client being notified that properties in proxy object have changed. I would like these changes in proxy object properties to propagate through the Tree's items. I have searched docs and this forum, but not found anything that addresses this issue. At the same time, I suspect that this is something that has been discussed - and may simply involve setting some flag on the Tree or the DataProvider... Thanks for any help! =Eric
RE: [flexcoders] Re: Trees, DataProviders and dynamic screen updates
...when the items referenced by the ArrayCollection change... How is that happening? The items... change? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cooper Sent: Wednesday, July 23, 2008 6:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Trees, DataProviders and dynamic screen updates I am adding to and removing from ArrayCollection - and when I do that, the Tree items refresh and are current. But when the items referenced by the ArrayCollection change, I am doing nothing. Is there a way to touch the ArrayCollection so as to prompt Tree to reload (or reevaluate) its dataProvider and call labelFunction to generate updated rendering? Or is the preferred way to step walk through ArrayCollection and modify (in place) the changed objects? Thanks. =Eric --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: If you use the ArrayCollection API to make the updates to the dataProvider, the changes should automatically reflect in the UI. How are you updating the ArrayCollection items? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Eric Cooper Sent: Wednesday, July 23, 2008 3:53 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Trees, DataProviders and dynamic screen updates Hi, I am trying to display changes in state for proxy objects (where real state exists on a server). I have defined a Tree and set its dataProvider to be an ArrayCollection. I have tried having this be an array of references to actual proxy object and also as array of dynamically created Objects (of form {name:foo.toString(), object:foo} Server-side events result in client being notified that properties in proxy object have changed. I would like these changes in proxy object properties to propagate through the Tree's items. I have searched docs and this forum, but not found anything that addresses this issue. At the same time, I suspect that this is something that has been discussed - and may simply involve setting some flag on the Tree or the DataProvider... Thanks for any help! =Eric