I have a problem using the concept of View Objects in
The problem I have is watching them. If one of my views has a
custom component, like the cover flow one, I need to watch for a
change to the current selectedItem. The when it changes I need to
create the panels and images and add them to the cover flow
Normally you would bind your data to a component like a data
grid rather than watching, but with something that needs building I
need to do the watching myself.
So when I change the selected item in another view, I do
something like this:
selectedItem = issuesSpreads.getItemAt(
coverflow.selectedIndex ) as SpreadVO;
This however resets the selectedItem and anything watching it
no longer picks up the changes.
Instead, it seems I have to go through all the properties of
the object and change them, triggering multiple events to be sent
to my watcher (which is another problems as I have to wait for them
all to be changed, although I can think of a work around, a last
This seems hacky, and also if I added a new property to the
VO I would have to update all the views that change it.
I'm wondering how people overcome this problem, I must be
doing something in the wrong way here....