I've found it amazingly easy to add an item to an ArrayCollection
from a PopUp window:
var newItem:Object = {date: myDate.id, height: myHeight, subject:
mySubject.text, notes: myNotes.text};
mainApp.myAC.addItem(newItem);
However, when it comes to updating that item from a PopUp, it appears
to be amazingly difficult (so difficult that I can't figure it out!).
mainApp.myAC.updateItem() doesn't seem to be possible from the PopUp,
in fact, I can't even do:
trace (mainApp.myAC.length);
This throw the common "Cannot access a property or method of a null
object reference" error.
I haven't tried it yet, but all I've found that looks like a
possibility, is to create variables in the parent, set those from the
PopUp, and then run a function to perform updateItem(), for each
value in the ArrayCollection row OR, delete the row, and add a new
one. Both create issues with sychronizing front-end display items and
backend databases.
Please help