3 Replies Latest reply on May 30, 2007 1:43 PM by LucaLT

    App design question

    LucaLT
      Hi there,

      first post for me in this forum. I recently grabbed a copy of flex mostly for trying out the new apollo run time. I'm catching up with the new AS 3.0 and mxml language (I'm coming from flash8). Right now I'm porting an applicaton I developed in Flash (a very simple one, I'm not a pro) using Apollo and the Remote object with the AMFPHP 1.9. Everything works fine expect for a very little flaw I can't seem to resolve. I created a wizard-like application using the viewStack component. The viewStack contains 4 "pages" and the comboboxes and datagrids that are inside some of them are populated with data coming from MySQL using AMFPHP. On the last "page" I have a datagrid that grabs the data based on the selection the user makes in the first page using a combobox. What happens is that everytime I run the application, the first time a change event is dispatched from that combobox I get an error. The reason I think is beacuse the change event calls a remote method and it's result it's supposed to go in the the datagrid on the last "page" which has not been created yet by flex, therefore giving me a "Error #1009: Cannot access a property or method of a null object reference.". What I can't understand is that if I dismiss the error and use the combobox again the datagrid gets updated just fine. My question is, is there a way to get that datagrid on the last page initialized when the application starts? I figured that if I can initialzed it before it gets displayed, I shouldn't get the erro, right?. I'm not sure if this is the best way to do it, so if you have any other suggestion it would be awesome. Thanks for your time and sorry for the long post!