Inline item mx:Image ... in mx:itemRenderer could not see the defination of method

I have following code and got a compilation error ("possiblely called an undefined function") because the <mx:Image ...> in the <mx:itemRenderer > could not see the defination of "aMethod" method:
<mx:Form ....>
<mx:Script><![CDATA[
private function aMethod(evt:Event):void {
           // code...
]]></mx:Script>
<mx:Canvas label="Tile View" width="100%" height="100%" >
          <mx:TileList id="photosTileList" dataProvider="{this.photoDP}" width="100%" height="100%"  >
                    <mx:itemRenderer >
                        <mx:Component>
                            <mx:Image horizontalAlign="center" source="{data.url.text()}"
                                toolTip="{data.caption.text()}" width="55" height="38" complete="aMethod(event)"/>  <!-- It causes the error -->
                        </mx:Component>
                    </mx:itemRenderer>
         </mx:TileList>
         <mx:Image .... complete="aMethod(event)"/>  <!-- It is OK here -->
</mx:Canvas>
</mx:Form>
I do not know why the inline <mx:Image> inside <mx:itemRenderer> can not see the "aMethod" function defination in the same mxml file.
Any suggestions?

You need outerDocument, and the method cannot be private, it should be public:
complete="outerDocument.aMethod(event)"
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
www.ChikaraDev.com
Flex / AIR Development, Training, and Support Services

Similar Messages

  • Could not complete the define custom shape command because of program error

    I am using the pen tool to draw a shape and then select it to create a custom shape. I use path: edit - define custom shape = "could not complete the define custom shape command because of program error"
    The error message appears once I click the define button.

    Also, I solved this another way, seems to happen to me often. I click on the path panel, near layers panel and clicked on 'load path as a selection' (3rd icon on bottom from left), then click 'make work path from selection' (4th icon on bottom from left). Then you will see that the whole work area is part of the selection, including your desired shape/path. In order to change this, just select 'path selection' tool and highlight each corner and delete each point from each corner, then you are left with the desired selection to create a shape. I am self taught and this seem unorthodox, but it works.

  • Deskto is right aligned and could not see the brouser

    once i open the internet by browsing Firefox the screen resolution is right aligned and could not see the full screen

    Hi,
    Trace with St01, which authorization obj is posting and see the user is having authorization for the object in the T code.
    thanks
    sk

  • Approver could not see the active button 'Approve'.

    Hi Gurus,
    I am a beginner to SRM and EBP.
    I have a problem to solve immediately.
    In the purchase order approve screen, approver could not see the active approve button . It is grayouted in the screen. I have checked the roles for the approver , and found ok..
    Please help me where to look for the problem and how to get activate the approve button..I will  highly appreciate if any related documents can be sent to [email protected]

    Hi,
       Maintain the entry in tcode SWL1 for Attributes EC_DECISION and EC_MAIL for the WF task.
    BR,
    Disha.
    Pls reward points for helpful answers.

  • HT4059 could not see the ibook icon on ipod touch 5th generation

    I downloaded the ibooks app in App Store, but could not see the iBooks app on the screen. Why?

    You've checked all of your homescreens for it, and tried searching for it via the spotlight search screen (swipe the first homescreen to the right) ? There is a limit of 11 homescreens after which apps are only accessible via the search screen.
    If that doesn't find it then have you tried a reset to see if it appears after the iPod has restarted : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the equivalent of a reboot.

  • I have iPhone4 with updated software 6.0.1. Voice nevigation for map is not working. I could not see the voice options in setting/mapp.

    I have iPhone4 with updated software 6.0.1. Voice nevigation for map is not working. I could not see the voice options in setting/mapp.

    Voice navigation is not available for the iPhone 4

  • HT201269 could not see the iphone icon in my Dell computer

    I have iphone4 and I could not see the iphone icon in my Dell computer when I connected with cable. In addition, it is showing that the MTP Driver is not installed properly in your computer. I wish to transfer iphone photos in to my computer. Please suggest me in this regard. thanks
    <Subject Edited by Host>

    Hi mallikb4u,
    Welcome to the Apple Support Communities!
    There are two separate steps you will need to take in this situation. The first thing I recommend you doing is following the first attached article to help you resolve your iPhone not showing in iTunes when connected.
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Once you complete the steps listed above and you iPhone is showing in iTunes, I recommend reading over and using the instructions in the next article for importing photos from your iPhone to your computer.
    iOS: Import personal photos and videos from iOS devices to your computer
    http://support.apple.com/kb/HT4083
    Have a great day,
    Joe

  • HT201335 Ive bought Apple TV and upgrade my macbook air Os X ver 10.8.2 but i could not see the airplay on the top menu bar . please help! thank you.

    Ive bought Apple TV and upgrade my macbook air Os X ver 10.8.2 but i could not see the airplay on the top menu bar . please help! thank you.

    The ability to use AirPlay is BOTH an OS requirement(Mountain Lion) AND has hardware requirements.  You need to check and see if your 2010 Air will support Airplay.

  • HT201304 ello my little brother has developed lock my iPhone and I could not see the unlocking code Please help and thank you

    Hello
    ello my little brother has developed lock my iPhone and I could not see the unlocking code Please help and thank you
    edited by host

    Hi Omar_a983,
    If you are having an issue with the passcode on your iPhone, you may find the following article helpful:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Regards,
    - Brenden

  • HT1657 rented The Amazing Spiderman and it froze and could not see the end.  I am requesting a refund.

    I rented The Amazing Spiderman and th e movie froze and I could not see the ending.  I am requesting a refund.

    These are user-to-user forums.  If you can't get it to play then use the 'report a problem' link from your purchase history : log into your account on your computer's iTunes via Store > View My Account and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find that film and use the 'Report a Problem' link.
    If that doesn't work (for some people it's been taking them to this site on a browser instead of showing a form in iTunes) then try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page.

  • When I open the word for mac, I could not see the Turkish characters. How can I fix it?

    When I open the word for mac, I could not see the Turkish characters. How can I fix it?

    Ask in the MS Office forums - http://answers.microsoft.com/en-us/mac.
    Good luck,
    Clinton

  • Could not see the data in the cube

    Hi all,
    Iam trying to load data from one cube to another. Everything is fine but Iam not able to see the data in the new cube.
    I created 2 cubes--> Cube A new & cube B new which are copied from existing cubes cube A and Cube B. I need to load data from these new cubes cube Anew & cube B new to another cube (cube C new)  which is also a copy of existing cube C. I created update rules and activated them.I tried to load the data into the cube C new. I can see the load to be green but I cannot see the data in the cube C new. it shows 0 records in cube C new. there are records in cube A new & cube B new.
    Can anyone plz help me out.
    Thanks in advance.
    Thanks,
    Preethi.

    Hi Balu,
    I dont know what exactly the problem was but even after the load was successful i could not see any records in the new cube. The source cubes had 60,446 and 7595 records. but the target cube had 0 records.
    I ran the program SAP_FACTVIEWS_RECREATE as Bhanu suggested and deleted the data from the new cube(inspite of having 0 records I deleted them). I tried to load the data again which was successful and I could see the data in the new cube.
    Hope its clear.
    Thanks,
    Preethi.

  • Portal Activity Report - could not see the latest iview /pages hits.

    I have configured my own iviews where they will display the 2 weeks iviews/pages that are accessed by users and count (hits) , but I am not able see the iview hits and iview names or pages hits or names in this Portal activity report, I could see only very old iviews not latest.
    Suggest me if there are any settings or configurations that I need to make.

    Hi All,
    Just in case Activity Collector or Portal Activity Report is not sufficient for you and your portal management to gather important usage data, you may be interested in our SAP certified solution, Click Stream.
    May make your life a lot easier when finding the usage stats you need (Easy installation u2013 Free download u2013 Fully functional test version available).
    More information here:
    Website: [www.sweetlets.com/clickstream|http://www.sweetlets.com/clickstream]
    EcoHub reviews: [http://ecohub.sdn.sap.com/irj/ecohub/solutions/clickstream|http://ecohub.sdn.sap.com/irj/ecohub/solutions/clickstream]
    Good luck and hope that helped.

  • I need to earase some of my old games on the i pad ,i try to push it and wait for it wiggle but i could not see the x sign ...is there somethig  else i should do or forgot to do ?

    i try to delele some of my old games of the i pad ...push in wait til wiggle and the x ....but haven't see the x come up ....what did i done wrong or why there is no x sign ????

    Try syncing to your Mac and then try again.  Don't know what is causing that problem. 
    If you really must delete the item from your ipad, first delete it in iTunes on your computer then sync the iPad with the computer. 

  • IE could not see the web posted

    After posting, while using IE to open the web, it always missing picture or not fully launch.
    And Google AdSense from the iweb itself I receive not approve, details show below:
    Difficult site navigation
    Further detail:
    Difficult site navigation: While reviewing web.me.com/tan.william, we
    found that your site was down. Google ads may not be published on a site
    that is not fully launched, functioning, or easily navigable. Once your
    site is functioning and has enough content for our specialists to review,
    we will be happy to reconsider your application.
    Could you please advice how to solve the problem?

    One thing you can do to make your site more compatible with IE is to convert those photos with drop shadows to an simgle image file that contains the photo and drop shadow. See Old Toad's Tutorial #7 - Converting Photos w/Frames, Drop Shadows and/or Reflections into a Single JPG Image.
    More tips on how to make a site more IE compatible can be found at this page of Roddy's iWeb for Musicians site: How to get your iWeb Site to load in Internet Explorer.
    On your photo page not having frames around the photos will greatly speed up that page's loading. Each frame adds 4 addition files to the page to load. Also your Me photo page has most of the frame files missing. They have not been uploaded with the rest of the files. The same goes for the WIL’s place photo page.
    OT
    Message was edited by: Old Toad

Maybe you are looking for