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 4622928
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:54:46+00:00 2026-05-22T02:54:46+00:00

If I have a flex component that is a general popup, it’s basically just

  • 0

If I have a flex component that is a general popup, it’s basically just a white popup that I pass an Array named “modules” to.

For instance:

var array:Array = ["mainArticle","title"];

or

var array:Array = ["creditCard"];

These are two examples that I might pass in. The first one would add my modules to the popup so the popup will be used for editing an “article.” The second would add the Credit Card Change module, which would be a form that would allow the user to update their credit card information.

My question resides in the dataProvider for this popup. If I am passing in the article updater, I need a dataProvider that contains information like “font,” “color,” “size,” etc. If I am passing in the credit card updater, I need a dataProvider that contains information like “number,” “securit code,” “expiration date,” etc.

I could have a dataProvider class that has all of the information and only sets what I need, but it could get huge if I did something like:

public class myDataProvider {
  public var mainTextFont:String;
  public var mainTextSize:int;
  public var mainText:String;

  public var cardNumber:String;
  public var cardExpiration:Date;
  public var cardSecurity:String;
}

This is sort of an abstract idea, but I am looking for a solution that allows me to give my popup dataproviders without using one central dataProvider that would have a copy for every possible situation.

Thanks!

  • 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-05-22T02:54:47+00:00Added an answer on May 22, 2026 at 2:54 am

    The simplest way to approach this is to create different dataProviders, depending on the class. My main popup has a “ModuleList” (custom list of strings) and it adds “modules” (not an actual flex module) to itself, giving each one the correct type of dataProvider.

    public var recipientList:RecipientList;
    
    private function setupModules():void {
      for each( var s:String in moduleList ){
        switch( s ){
          case 'recipients':
            var recipients:Recipients = new Recipients();
            recipients.list = recipientList;
            break;
          case 'article':
            // Article Logic
            break;
          case 'creditCard':
            // Credit Card Logic
            break;
        }
      }
    }
    

    This is just a generic idea, I was wondering what the best way to do this was, and this is how I decided to approach it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just imported a Flex component into my project. I have a theory question
I have a Flex component that, instead of inheriting directly from Canvas, inherits from
I have a component that extends UIComponent of Flex, I want to add it
I have code in a flex component that I want to listen for an
I am trying to extend the flex datagrid component so that I can have
Right now I have an Accordion component in Flex that has two children, I
We have a number of AS/Flex components that we've built over time and improved
So I have a flex tree component with a xmllistcollection as it's data provider.
I have a requirement to be able to provide a flex component in English
I'm creating a new Flex component (Flex 3). I'd like it to have a

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.