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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:48:26+00:00 2026-06-01T19:48:26+00:00

Flex 4.6 Mobile Application I am getting the error access to undefined property PrepForDisplay

  • 0

Flex 4.6 Mobile Application

I am getting the error “access to undefined property PrepForDisplay”

In my Declarations tag I have

 <s:CurrencyFormatter id="PrepForDisplay"
     currencySymbol="" 
     useCurrencySymbol="true"
     negativeCurrencyFormat="0"
     positiveCurrencyFormat="0"/>

In my MXML section I have

<s:List id="lst" dataProvider="{dp}" useVirtualLayout="true" width="100%" height="95%" top="30" alternatingItemColors="[#66FFFF, #33CCCC]">
<s:itemRenderer>
<fx:Component>
       <s:ItemRenderer>
    <s:HGroup  gap="10">
    <s:Label text="{data.Period}" />
    **<s:Label text="{PrepForDisplay.format(data.Payment)}" />**
    </s:HGroup>
  </s:ItemRenderer>
</fx:Component>

The error occurs on the bold line.
If I change it to Number(data.Payment).toFixed(2) everything works fine.
I have used the currencyFormatter the way I have it on other views with success. I can even use it on this view in a function but when I try to apply it in the label I get the error.

Any ideas?

cheers,

  • 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-01T19:48:27+00:00Added an answer on June 1, 2026 at 7:48 pm

    My guess is, that its a scoping error, on other words the formatter gets created in the scope of the component, that creates the list, and the itemrenderer gets instantiated be the list. So it does not know of a variable (PrepForDisplay), that is referenced inside the itemrenderer.

    To solve it, simply move the CurrencyFormatter tag inside the itemrenderer:

    <s:ItemRenderer>
    <fx:Declarations>
    <s:CurrencyFormatter id="PrepForDisplay"
     currencySymbol="" 
     useCurrencySymbol="true"
     negativeCurrencyFormat="0"
     positiveCurrencyFormat="0"/>
    </fx:Declarations>
    <s:HGroup  gap="10">
        <s:Label text="{data.Period}" />
        <s:Label text="{PrepForDisplay.format(data.Payment)}" />
    </s:HGroup>
    

    Or simply define the itemrenderer in a separate file.

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

Sidebar

Related Questions

I have a view like this in my Flex mobile Application: <s:View xmlns:fx=http://ns.adobe.com/mxml/2009 xmlns:s=library://ns.adobe.com/flex/spark
In a Flex Mobile Application, I have a situation where I need to dynamically
i have a mobile application that i am creating in Adobe Flex (Flash Builder
I have a completed Flex Mobile application, built for the Blackberry Playbook. I would
I have a Flex Mobile Application that requires users to input data into a
Hi, I have been working on a Flex Mobile application using Flash Builder 4.6.
I'm using the SpinnerList component in a flex mobile application, the spinner turn too
I'm using Parsley in my flex mobile project. I have multiple destination services but
I made a simple Flex mobile application to test TextInput fields. I define my
I am trying to implement Stock Charts in my Mobile application created in flex.

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.