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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:55:09+00:00 2026-06-12T01:55:09+00:00

In my application I have a list of items which can be changed either

  • 0

In my application I have a list of items which can be changed either by clicking on the list, using a next/previous button or via a menu which allows them to jump between items (mainly for the phone version which doesn’t display the list).

I’m using the ensureIndexIsVisible function after the data provider for the list has been populated. However sometimes when I return to this page the application crashes out with the following error:

RangeError: Error #1125: The index 0 is out of range 0.
at spark.layouts.supportClasses::LinearLayoutVector/getMajorSize()[E:\dev\4.y\frameworks\projects\spark\src\spark\layouts\supportClasses\LinearLayoutVector.as:420]

The strange thing is that the index I pass into the function when it crashes isn’t 0. It can be 1 or 3 or presumably anything. I can stop the application from crashing if I remove the function call but I need the list to show what question is currently selected.

The actual line that crashes is this:
var block:Block = blockTable[index >> BLOCK_SHIFT]; from a function called getMajorSize

  • 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-12T01:55:10+00:00Added an answer on June 12, 2026 at 1:55 am

    As this has gone unanswered for so long I thought I’d answer it myself back with what I’ve recently ended up doing.

    I managed to get this issue resolved by mainly changing the points where I called the function. i.e. it was being called too early.

    However I recently changed over to using a custom function that someone else posted as I found that the ensureIndexIsVisible was often jumping to the wrong position in the list (due to a variety in heights of the items).

    The function can be found on this question and is called scrollToIndex:
    Scroll to selected item in Flex 4 Spark List component

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

Sidebar

Related Questions

I am creating an application that will have a list of items that can
Imagine the typical type of application where you have a list of items with
Hello i'm doing a application in php, and i have a list of items
i am doing a web application in flex. i have a list of items
I have some event handlers which are tracking list items in my SharePoint lists.
I have a huge Collection (which I can cast as an enumerable using OfType<>())
In a Win32 application I have a dialog with a list control which is
I am developing a soundboard application which extends ListActivity. I have a play button
In my application, I have list view. Selecting another item in it, triggers an
In my application, I have a listview whose list item consists of a TextView

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.