Howdy- Follow up for all.
Solution: Delete the view component and rebuild it from scratch. Explanation: I do not know why object deep copy fails sometimes in Flex, but after rooting around searches for two days I remembered something from the days of Flex 2 -- when all else false, delete and rebuild. Well, that's what I did and it worked. Cut my View code and pasted it to notepad, and then created a new View component with a different name. Pasted in my code from notepad. Integrated this new differently-named component in the app "et voila!": Problem Solved. BTW - the cut & paste operation was to assure myself that the problem was *NOT* coder error.... Sheesh! I REEEEAlly hate cheesy fixes like this. Naga --- In flexcoders@yahoogroups.com, "nagaofthesea" <nagaofthesea@...> wrote: > > Hi- > > Thanks, but the AS operator results in a NULL because the conversion > fails(!!). > > Bottom line: AS operator does not work for this problem ... > > Naga > > --- In flexcoders@yahoogroups.com, "Chuck Preston" <itsmechuckjr@> wrote: > > > > I don't know the reason why objects lose their type sometimes, but I know > > that when it does happen, the solution is to retype them. In your case, > > you'd have to do something in your first view like: var > > modelLocator:ModelLocator = data as ModelLocator; > > > > > > --- In flexcoders@yahoogroups.com, "nagaofthesea" <nagaofthesea@> wrote: > > > > > > Howdy- > > > > > > I have used (my customized) Cairngorm 2.0 and Flex 4.5.1 to build my > > > first iOS + Andorid app. Launched and available at iTunes and Android > > > Market without a hitch. > > > > > > I am building another flavor of the same app and BAM! type conversion > > > error with the passing of the data object!! What?? > > > > > > ViewNavigatorApplication.firstViewData is passed the ModelLocator when > > > the app starts. When I inspect the variables, the > > > parentDocument.firstViewData is strongly typed to ModelLocator. > > > > > > HOWEVER, when the View gets finally gets passed the "data", View.data is > > > typed as Object -- not strongly-typed ModelLocator. > > > > > > I double-checked with my published app and the View.data is always the > > > strongly-typed ModelLocator -- which is the expected behavior. > > > > > > Anybody know what gives / how to correct this fluky behavior? > > > > > > The error output is worthless - just the generic #1034 pointing to the > > > addHandler that tries to cast the View.data to the ModelLocator. As the > > > app is just starting up, all of the preceding lines are pointing to > > > framework code only. > > > > > > This is kindofa pain in the arse, because I just can't see why the "data" > > > property looses its strong type.... > > > > > > Regards, > > > Naga > > > > > >