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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:57:47+00:00 2026-06-07T01:57:47+00:00

I’ve been trying to learn flex/flash programming and am working on a project where

  • 0

I’ve been trying to learn flex/flash programming and am working on a project where I need to populate a spinner list in flex dynamically from a string. I have a function that separates the string using “split” and now I need to populate an array list. I have been working with this stupid big for hours now and can;t find help anywhere. I keep getting the following error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at views::CommonPlaces/initApp()[/Users/twing207/Documents/Adobe Flash Builder 4.6/AmericanTaxi/src/views/CommonPlaces.mxml:30]

My code is here:

<fx:Script>
    <![CDATA[
        import mx.collections.ArrayList;
        import spark.events.IndexChangeEvent;

        var Arr1:Array;
        var Arr2:Array;
        var Arr3:Array;

        [Bindable]
        public var CommonPlacesArray:ArrayList;

        var CommonPlacesData:String = new String("2133664:American Taxi Dispatch, Inc:Mount Prospect:834 E RAND RD|2133665:Walmart:Mount Prospect:930 Mount Prospect Plaza|2228885:Garage:Des Plaines:1141 Lee St|2228886:Asian Island:Palatine:1202 E Dundee Rd|2229464:Kohl's:Arlington Heights:700-856 W Dundee Rd|");
        var CurrentSelect:String = new String();

        private function initApp():void {

            Arr1 = CommonPlacesData.split("|");
            var arrLength:Number = new Number(Arr1.length);

            for (var i:Number = 0; i < (arrLength - 1); i++) {
                CurrentSelect = new String(Arr1[i]);
                Arr2 = CurrentSelect.split(":");

      //THE LINE BELOW IS WHERE IT STOPS:
                CommonPlacesArray.addItem(Arr2[1]);
            }

        }

It doesn’t seem to like the “CommonPlacesArray.addItem” line. Any help or a point in the right direction would be great. Thanks in advanced!

On another note, I am also getting the error: “Access of undefined property: data” on the following:

Here in another view I set the value for data.UserCommonReturnData to a string.

function LoginLoaded (e:Event):void {
                        trace(e.target.data);
                        var ServerReturn:String;
                        ServerReturn = new String(e.target.data);
                        data.UserCommonReturnData = ServerReturn;
                        navigator.pushView(CommonPlaces, data);
                    }

and here I try to pull it back:

var CommonPlacesData:String = new String();
            var CurrentSelect:String = new String();

//The next line gives the error:
CommonPlacesData = data.UserCommonReturnData;

Any idea??

  • 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-07T01:57:48+00:00Added an answer on June 7, 2026 at 1:57 am

    You never construct CommonPlacesArray, you just declare it.

    var CommonPlacesArray:ArrayList = new ArrayList();
    

    If you check the Array List API you can also clearly see it has a constructor that accepts an array, meaning you can copy the data to it without having to iterate over it yourself.

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.