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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:08:10+00:00 2026-06-11T02:08:10+00:00

These are the scripts under same application first one is under application and second

  • 0

These are the scripts under same application first one is under application and second is under dataGrid. from first script through outerClick() i am accessing a inner() function in itemrenderer. Well I can easily access the function outer() from innerClick() by outerDocument object but what_to_use to access inner() function in itemrenderer from outerClick() function. i tried with mx:component id”” and also class=”” but it is not able to identify functions under itemrenderer.

  <mx:Script>
    <![CDATA[

        public function outer():void{
            Alert.show("Hi i am outer object");
            }
        public function outerClick():void{
            what_to_use.inner();
        }
    ]]>
</mx:Script>

This below item is rendered under data grid.

<s:itemRenderer>
        <mx:Component>
            <s:GridItemRenderer>
                <fx:Script>
                    <![CDATA[
                            public function innerClick():void{
                                outerDocument.outer();
                            }
                            public function inner():void{
                                Alert.show("Hi i am inner");
                            }
                    ]]>
                </fx:Script>
                    <s:CheckBox id="sel" selected="{data.checked=sel.selected}" change="{data.checked}" click="innerClick()"/>                                  
            </s:GridItemRenderer>
        </mx:Component>
    </s:itemRenderer>
  • 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-11T02:08:12+00:00Added an answer on June 11, 2026 at 2:08 am

    if we can access outer function from rendered item by using
    “outerdocument” object then cant we access inner function from
    outside.?

    You seem to have a distinct misunderstanding of what itemRenderers are. An itemRenderer is a component definition, sort of like creating your own class. since you are using your the ‘outerDocument’ reference, you are creating your own class in-line / embedded within another class.

    An instance of your custom itemRenderer class is created for every visible item in your List based class; so your own class is created multiple times, which means there is more than 1 instance of your itemRenderer function. How would Flex know which itemRenderer instances you want to call the function on? In fact it can’t.

    That is why you can call up, but you cannot call down.

    If you need to make changes inside the itemRenderer, you should do so by changing the data elements of the dataProvider.

    For all intents and purposes, I recommend against using outerDocument too. It is a break in encapsulation. A component should never try to access its’ parent; because that often introduces an unneeded dependency to your component, limiting reuse. The proper way to “communicate up” is to dispatch an event from the itemRenderer and listen for it in the parent class.

    This concept is covered briefly on the answer to one of your previous questions.

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

Sidebar

Related Questions

I've found that all of these scripts, while doing the same thing create memory
I have created total 50 test scripts. All these scripts use almost same objects
how to get the links from these nodes: script <- getURL(www.r-bloggers.com) doc <- htmlParse(script)
My script receives gzipped data from a desktop application via POST, which it retrieves
In Microsoft SQL Server Management Studio 2008 there is a Generate scripts... option under
I have a number of scripts used to build a database. These need to
I have a few sql scripts that I need to run via SQL*Plus. These
We have a series of scripts that are used when building Apache. Specifically these
I'd like to have a web frontend to my powershell scripts for helpdesk. These
I've got an MVC web application with associated controller tests that run under 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.