when you do this, in the debug panel do you get Property is not Bindable, Class is not an IEventDispatcher or something along those lines, i dont remb the exact wording but if it doesnt say that then from what i read you dont use an itemUpdated(), show a bit of code if u can.
----- Original Message ---- From: jmfillman <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Wednesday, January 23, 2008 12:16:41 PM Subject: [flexcoders] Re: Update ArrayCollection from PopUp TitleWindow Anyone? I seem to need syntax help. This doesn't update the arrayCollection, but does trigger the CollectionChange event. mainApp.myAC. itemUpdated( mainApp.myAC [itemIndex], mainApp.myAC. getItemAt (itemIndex). subject,' ',itemSubject. text); This is coming from a PopUp window. --- In [EMAIL PROTECTED] ups.com, "jmfillman" <[EMAIL PROTECTED] ..> wrote: > > CORRECTION: > > mainApp.myAC. itemUpdated( mainApp.myAC > [itemIndex], mainApp.myAC. getItemAt > (itemIndex). subject,' ',itemSubject. text); > > Typo on my part. Trying to abbreviate the post; typo not in source > code. > > --- In [EMAIL PROTECTED] ups.com, "jmfillman" <jmfillman@> wrote: > > > > Alex, > > > > Thank you for the reply. I found part of the problem by tracing > what > > was getting passed to the PopUp, but I believe that I still have a > > syntax issue from the PopUp. > > > > I'm using the code below. I don't get any errors, and it does > trigger > > a CollectionChange event on the AC, but it isn't updating the AC. > The > > previous value is not getting changed. > > > > mainApp.myAC. itemUpdated > > (mainApp.myAC. itemIndex] ,mainApp. myAC.getItemAt > > (itemIndex). subject,' ',itemSubject. text); > > > > This does update the AC, but doesn't trigger the CollectionChange > > event: > > > > mainApp.myAC. getItemAt( itemIndex) .subject = itemSubject. text; > > > > > > --- In [EMAIL PROTECTED] ups.com, "Alex Harui" <aharui@> wrote: > > > > > > It is really a matter of determining when those values get set. > You > > > might be using them before they are defined. Post some of your > > code. > > > > > > ____________ _________ _________ __ > > > > > > From: [EMAIL PROTECTED] ups.com > > [mailto:[EMAIL PROTECTED] ups.com] On > > > Behalf Of jmfillman > > > Sent: Saturday, January 19, 2008 9:08 PM > > > To: [EMAIL PROTECTED] ups.com > > > Subject: [flexcoders] Re: Update ArrayCollection from PopUp > > TitleWindow > > > > > > > > > > > > setItemAt and getItemAt work in the main application, but not > from > > > the PopUp window. From the PopUp, "Cannot access a property or > > method > > > of a null object reference". Seems only addItem() works from the > > > PopUp. > > > > > > --- In [EMAIL PROTECTED] ups.com <mailto:flexcoders% > > 40yahoogroups. com> > > > , Sherif Abdou <sherif626@> wrote: > > > > > > > > mainApp.myAC. updateItem( ) where are you getting the updateItem > > () > > > method from? there is no updateItem() method in the collection, > > best > > > stradgey for this i would think is so just use the setItemAt() > and > > > getItemAt(); > > > > m.setItemAt( newItem,m. getItemAt( oldItem)) > > > > > > > > > > > > > > > > ----- Original Message ---- > > > > From: jmfillman <jmfillman@> > > > > To: [EMAIL PROTECTED] ups.com <mailto:flexcoders% > > 40yahoogroups. com> > > > > Sent: Saturday, January 19, 2008 8:35:59 PM > > > > Subject: [flexcoders] Update ArrayCollection from PopUp > > TitleWindow > > > > > > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > ____________ _________ _________ _________ _________ _________ _ > > > ____________ __ > > > > Looking for last minute shopping deals? > > > > Find them fast with Yahoo! Search. > > > http://tools. search.yahoo. com/newsearch/ category. php? > > category=shopping > > > <http://tools. search.yahoo. com/newsearch/ category. php? > > category=shopping> > > > > > > > > > > > > > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ