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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:17:47+00:00 2026-06-08T17:17:47+00:00

I’ve searched and searched and can’t find an answer. Actually all the things I’ve

  • 0

I’ve searched and searched and can’t find an answer. Actually all the things I’ve been reading seem to point to the fact that I’ve done it correctly, but it’s just not working.

I’m working on a web mapping application. I want to create a SelectionManager class that would be available to all my mxml files (widgets). The point is that I have multiple widgets that will be selecting stuff from the map and instead of sending events back and forth between widgets, I’d rather have one single class that holds all the information.

Right now, I’ve tried something like this :

package SomePackage.utils
{
    public class SelectionManager
    {
        public static var _selectionSets:ArrayCollection = new ArrayCollection();
        public static var _currentSelectionSet:Object;

       (Many static functions... ex: AddToCurrentSelectionSet, removeFromCurrentSelectionSet, CreateNewSelectionSet, etc.) 
    }
}

The _selectionSets is an arrayCollection of objects. The _currentSelectionSet holds one of the objects in the _selectionSets arrayCollection. For example, I will have a BufferSelectionSet and a QuerySelectionSet. When I open the Buffer Widget, I want the _currentSelectionSet to hold the appropriate selectionSet from the _selectionSets Array Collection. This way, anytime I click on something when the Bufferwidget is opened, it will be added to the appropriate selection set.

Right now, both my widgets import the SelectionManager class but do not instanciate it. What happens is that both my widgets seem to hold a different SelectionManager while I was expecting them to have the same SelectionManager, with the same static vars.

For example, if I set the currentSelectionSet from within my Buffer Widget, i will see that it is set to the Object in the ArrayCollection. But if I look at the currentSelectionSet from my Query Widget, it will be null.

I’m not sure if i’m being clear enough, I can give more details if necessary. Like I said, I’ve looked and looked with no success. Furthermore, I’m not a beginner at Flex and AS 3.0 and have quite a bit of experience in other programming language. I’m just completely stumped on this, maybe it’s just been a long day.

Thanks for any help.

Added Information :

MY widgets are in a package parallel to the utils package, i.e.: SomePackage.Widgets

  • 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-08T17:17:49+00:00Added an answer on June 8, 2026 at 5:17 pm

    I did not really find any satisfying answer for this so I ended up extending a bunch of classes so I did not have to go with static variables and methods. It’s more work but ends up giving a better looking solution.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I have a text area in my form which accepts all possible characters from

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.