Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7989545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:46:55+00:00 2026-06-04T12:46:55+00:00

In my main application I have a result event and an XMLList , which

  • 0

In my main application I have a result event and an XMLList, which is filled with my results. The XMLList is defined outside of a function like so:

public var testList:XMLList = new XMLList();

But within my result handler it is populated with data from the result and it works fine. I need to create an external component MXML file that will contain a List, but from within that component file I can’t access testList from the main application.

I have included xmlns:local="*" in each file and my component file also has the following imports:

import mx.collections.XMLListCollection;
import mx.controls.Alert;
import mx.core.Application;
import mx.events.FlexEvent;
import mx.rpc.events.ResultEvent;

I don’t understand what I’m doing wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:46:57+00:00Added an answer on June 4, 2026 at 12:46 pm

    You need to pass the testList as a property of your component.

    Main – you have the testList from your result event and your custom component. Pass the testList to a property you’ve defined in the component, such as data:

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:local="*">
    
        <fx:Script>
            <![CDATA[
                [Bindable]
                public var testList:XMLList = new XMLList();
            ]]>
        </fx:Script>
    
        <local:CustomComponent data="{testList}" />
    
    </s:Application>
    

    CustomComponent – from the component you created, access the testList from a property, such as data in this example:

    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:mx="library://ns.adobe.com/flex/mx">
    
        <fx:Script>
            <![CDATA[
                [Bindable]
                public var data:XMLList;
            ]]>
        </fx:Script>
    
        <s:List dataProvider="{new XMLListCollection(data)}" />
    
    </s:Group>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my main application delegate which contains a method that returns an object.
I have a function which must run completely, without interruption, and return a result.
I have my main application ,from my main application I will be calling another
I have a main application, and a bunch of sub-applications (they are separate apps,
I have a java main application, and I want to use log4j. I don't
So I have a UIViewController (main application controller is a TabBarController). On this there
I have a List in the main application and I am trying to access
I have an update program that is completely independent of my main application. I
I have an application thats main goal is to play a specific video file.
In my Backbone application I have a main view that shows previews of posts.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.