Binding data in one MXML component to a Text component in a different MXML component - need help please
I seem to be missing what the link is between different MXML components. What I want to do is load in external XML, populate a data Model with the loaded data, and bind that data to a dozen different MXML components controlled by a ViewStack. I can do what I want when I am in one MXML file, but I am having a problem talking between MXML files. I need to bind components in one MXML file to a Model in a different MXML file In the sample below the obvious problem is that the PatientSummaryView.mxml component does not have access to the patientSummaryExternal Model defined in Main.mxml. I do not know how to make that connection. I have tried a half-dozen different options with name spaces and eventHandlers, but I cannot seem to get it to work. I'm sure I am just missing a basic concept, but I cannot find the answer I need in the help. If you can give me any tips I would appreciate it. <!-- Main.mxml --> <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"> <mx:Model source="assets/data/caseStudy_01.xml" id="patientSummaryExternal"/> <mx:ViewStack id="stateViewStack" left="10" top="30" bottom="40" right="10" creationPolicy="all"> <PatientSummaryView id="patientSummaryView" label="Patient Summary"/> </mx:ViewStack> </mx:Application> <!-- PatientSummaryView.mxml --> <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" width="300" height="300"> <mx:Text text="{patientSummaryExternal}" /> <!-- Error Here! 1120: Access of undefined property patientSummaryExternal. </mx:Canvas> Thanks --jason -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/