My Flex components constantly throw error: #1009

In a user interface, we've created, we use many elements drawn in flash and exported using the flash components.  Almost any time there is a user interaction this components, or if the application loses focus, it throws error 1009.  This problem is so prolific, that we can not find the cause.  Here are a few of the error stack traces:

TypeError: Error #1009: cannot access a property or method of a null object reference.

to::UIMovieClip/removeFocusEventListeners() [E:\dev\trunk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:2466] mx.flash

to mx.flash::UIMovieClip/focusOutHandler() [E:\dev\trunk\frameworks\projects\flash-integratio n\src\mx\flash\UIMovieClip.as:2509]

to flash. display::Stage / set focus()

to::UIComponent/setFocus() fl.core

to::FocusManager/setFocus() fl.managers

to::FocusManager/mouseDownHandler() fl.managers

The above happened when I clicked on a flex component exported from flash this is a clip that contains only a text field.

TypeError: Error #1009: cannot access a property or method of a null object reference.

to::UIMovieClip/removeFocusEventListeners() [E:\dev\trunk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:2466] mx.flash

to mx.flash::UIMovieClip/focusOutHandler() [E:\dev\trunk\frameworks\projects\flash-integratio n\src\mx\flash\UIMovieClip.as:2509]

to flash. display::Stage / set focus()

to::UIComponent/setFocus() fl.core

to::FocusManager/setFocus() fl.managers

to::FocusManager/mouseDownHandler() fl.managers

The above happened when I clicked on a flash component flex exported within a scroll within another component flash flex exported flash component.

Maybe part of the problem try to mix the flash and flex frameworks too.  Any help would be appreciated.

Dan

This looks like a bug.  Workaround should be to change the focus to something else before removing a component from the stage.

Tags: Flex

Similar Questions

  • Runtime error 1009 after conversion from Flex 3.6 to 4.5.1

    I am trying to convert my SDK 3.6 application 4.5.1.  Process goes smoothly through many resources out there including Greg Lafrance http://www.adobe.com/devnet/flex/articles/migrating-flex-apps-part1.html series

    Now, I get an error while the application is loading in the browser.  The error text is:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    hand / initApp ()...

    The error occurs in the code AS where I'm looking to get the URL of the player using the mx.utils.URLUtil library.  In particular, I'll put a global variable in my application to the URL of the visitor.  The specific code for this is:

    this.stServerName = URLUtil.getServerName (mainApp.url);

    URLUtil is still in use in Flex 4.5.1?  If not, is there another way to get the name of the server on the host?

    Thank you!

    Lee

    URLUtil still exists.  I would check that's null.

  • Flex 4 Modules Error #1009

    Hi all

    I am upgrading my applications to flex 3 and flex 4.5 and has encountered an error. It occurred when a component has been added dynamically in a module. The codes that can simulate the error were extracted as below.

    TestError.mxml

    <?xml version="1.0" encoding="utf-8"?> 
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
         
         <mx:Script>
              <![CDATA[
                   import mx.events.ModuleEvent;
                   
                   protected function ml_readyHandler(event:ModuleEvent):void
                   {
                        trace("Module finished loading");
                        (ml.child as TestErrorModuleInterface).testTracing();
                   }
              ]]>
         </mx:Script>
         
         <mx:ModuleLoader id="ml" url="TestErrorModule.swf" ready="ml_readyHandler(event)"/>
         
    </mx:Application>
    

    TestErrorModule.mxml

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" 
                 layout="absolute" width="100%" height="100%"
                 implements="TestErrorModuleInterface">
         <mx:Canvas id="_box">
              <mx:Label text="HERE IS MY TEST MODULE" x="142" y="133"/>
         </mx:Canvas>
         
         <mx:Script>
              <![CDATA[
                   
                   public function testTracing():void
                   {
                        trace("This is a method in the Test Module");
                        var comp:TestErrorModuleComp = new TestErrorModuleComp();
                        _box.addChild(comp);
                   }
              ]]>
         </mx:Script>
         
    </mx:Module>
    

    TestErrorModuleInterface.as

    package
    {
         public interface TestErrorModuleInterface
         {
              function testTracing():void;
         }
    }
    

    TestErrorModuleComp.mxml

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml">
         
         <mx:Label text="element" width="80" />

    </mx:Canvas>

    And it is detailed error stacktrace:

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
         at TestErrorModule/testTracing()[F:\MyEclipse_9_0\workspace\ViSR_Interface_Flex4\flex_src\TestErrorModule.mxml:16]
         at TestError/ml_readyHandler()[F:\MyEclipse_9_0\workspace\ViSR_Interface_Flex4\flex_src\TestError.mxml:12]
         at TestError/__ml_ready()[F:\MyEclipse_9_0\workspace\ViSR_Interface_Flex4\flex_src\TestError.mxml:17]
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at mx.core::UIComponent/dispatchEvent()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\UIComponent.as:13128]
         at mx.modules::ModuleLoader/moduleReadyHandler()[E:\dev\hero_private\frameworks\projects\mx\src\mx\modules\ModuleLoader.as:465]
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at ModuleInfoProxy/moduleEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1149]
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at ModuleInfo/readyHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\modules\ModuleManager.as:793]
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at mx.core::FlexModuleFactory/update()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:535]
         at mx.core::FlexModuleFactory/docFrameHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:681]
         at mx.core::FlexModuleFactory/docFrameListener()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:131]
    

    Thank you very much!

    -Jingwei

    _Box is null?  It may not have been created yet.

  • Scroller causing crash (error #1009)

    OK, this is a strange error which I assume is a bug of flex:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to flashx.textLayout.container::ContainerController/getScrollDelta()

    to flashx.textLayout.container::TextContainerManager/getScrollDelta()

    to spark.components::RichEditableText/getVerticalScrollPositionDelta()

    to spark.components::VScrollBar / http://www.Adobe.com/2006/Flex/MX/internal:mouseWheelHandler ()

    at flash.events::EventDispatcher/dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent()

    at mx.managers::SystemManager/mouseWheelHandler()

    I get this error when I paste text into a text box that has active Squiggly.  When you paste text, you get a carriage further back in the end regardless if your initially selected text had a.  I found that if the text you paste is exactly the right length to fill your text box vertically WITHOUT activating the scroll, but the CR at the end (a by-product of the collage) causes the length of your pasted text to really go beyond the limits of the styll (, thus enabling vertical scrolling), then what is causing the timeout flash drive.  If you press on continue in the debugger, you get the error 1009 above.

    HOWEVER, if you have a single line, so more a problem.  It seems to be only a problem if the carriage of the pasted text return 'active' on the wheel.

    You can also reproduce this by pasting text that is a bottom line to above, complete with carriage return, which is a shy line cause vertical scrolling.  Then go to the top of the text and press ENTER to force bonded transport back to activate scrolling.  It seems to be just a problem with the return of carriage caused by collage.  Reproduce this by pressing ENTER does not appear to cause the same problem.

    Any thoughts?

    I found the question myself.  It had to do with changers of nesting.  I removed it offend one and not to break.

  • Error #1009: Cannot access a property or method of a null object

    Hi guys,.

    I'm developing a Flex 3 Application.

    I have an accordion, with two canvas:

    • first painting (by default the selected accordion one) contains an advanced data column in the grid (with a stream of XML data provider) that call the function, quot; clarity_itemClick (event) & quot; on an itemClick.
    • the second canvas contains a custom component (ClarityActionDetail.mxml)

    The function called on the itemClick is the following:

    private function showClarityDetail(event:ListEvent): void { }

    clarityAccordion.selectedChild = detailClarity;

    clarityDetail.dataClarity = event.itemRenderer.data;

    }

    clarityDetail is the id of my custom component and dataClarity is a this variable in my custom component.

    When I click on an element of my DataGrid for the first time, the debugger shows the following error:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    components::ClarityAllActions/showClarityDetail() [C:\workspaces\Clarity\TODO\flex_src\com ponents\ClarityAllActions.mxml:67]
    components::ClarityAllActions/clarity_itemClick() [C:\workspaces\Clarity\TODO\flex_src\com ponents\ClarityAllActions.mxml:71]
    components::ClarityAllActions/__clarityGrid_itemClick() [C:\workspaces\Clarity\TODO\flex_s rc\components\ClarityAllActions.mxml:77]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent() [C:\autobuild\3.2.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9298]
    at mx.controls.listClasses::AdvancedListBase/mouseClickHandler() [C:\work\flex\dmv_automation \projects\datavisualisation\src\mx\controls\listClasses\AdvancedListBase.as:8270]
    at mx.controls::AdvancedDataGrid/mouseClickHandler() [C:\work\flex\dmv_automation\projects\da tavisualisation\src\mx\controls\AdvancedDataGrid.as:8422]

    (Line 67 corresponds to & quot; clarityDetail.dataClarity = event.itemRenderer.data; & quot;)

    The second times I click on an element, the second accordion opens and the custom component is loaded with the correct data (= dataClarity).

    I don't know how the fix of this problem and any help would be greatly appreciated. Searching on the forums and how - to, to, I read on an on ADDED_TO_STAGE eventlistener, but fails to understand how to implement this in my code.


    Thank you


    Florian

    Change creation strategy on the container parent to 'all '.  Default value creation strategy is not to create an item until it is necessary on the stage, so when you try to reference the custom component that is on the Web that has not yet been posted, it has not yet been created.

  • Windows Modules Installer error: 1009

    Hello

    I use Windows 7. I made this mistake in a significant way of Error 1935. I encountered this problem with many cases, including install MSXML 4.0 SP2 etc.
    And I used the method of size of the registry unlimited (value 0xffffff) etc. All do not work in my PC.

    After I checked the CBS, I realized that it's something wrong in the modules of windows install (trustedinstaller.exe), when I tried to start the services, I got the following error:

    Windows could not start the service of installation of modules windows on the Local computer.

    Error 1009: The configuration registry database is damaged.

    We still need to fix without reinstalling windows (see: http://social.technet.microsoft.com/Forums/en/itprovistaapps/thread/17b35f3e-82c3-4491-b94e-6a01c3abf854)? I have a lot of already installed SW.

    Here is an excerpt of the CBS.log newspaper

    2011-12-06 17:10:33, info CBS TrustedInstaller start initialization.
    2011-12-06 17:10:33, v6.1.7601.17592 Info CBS responsible Servicing Stack with Core: C:\WINDOWS\winsxs\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17592_none_0b0e4b4025cf4049\cbscore.dll
    2011-12-06 17:10:33, CBS News could not load the hive of COMPONENTS of "C:\WINDOWS\System32\config\COMPONENTS" in the registry key 'HKLM\COMPONENTS '. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, CBS News could not load the DLL WCP. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, info CBS failed to initialize the base DLL: [HRESULT 0x800703f1 - ERROR_BADDB =] C:\WINDOWS\winsxs\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17592_none_0b0e4b4025cf4049\cbscore.dll
    2011-12-06 17:10:33, CBS News could not initialize the basis of CBS. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, initialization information CBS ending TrustedInstaller.
    2011-12-06 17:10:33, CBS News could not initialize the Trusted Installer. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, finalization of information CBS from TrustedInstaller.
    2011-12-06 17:10:33, trusted Installer Info CBS core has not been initialized.
    2011-12-06 17:10:33, finalization of information CBS ending TrustedInstaller.

    Thanks in advance.

    Hi Larry,

    Follow these steps:

    Method 1:

    Scan a checker (SFC) system files on your computer.

    SFC tool scans system files and replaces incorrect versions of system files by using the correct versions.

    For instructions, see How to use the tool File Checker system to resolve missing or corrupted on Windows Vista or Windows 7 system files

    Method 2: Perform a repair of Windows 7 installation.

    For instructions, see this article:

    How to perform an upgrade on the spot on Windows Vista, Windows 7, Windows Server 2008 & Windows Server 2008 R2

    See also: installation and reinstallation of Windows 7

  • Error #1009 in Flash

    Hello everyone, I'm having some unexpected problems in Flash. I wanted to build a basic Button, TextInput, and TextArera. The code looks fine. When I pressed ctrl + enter, I got a long enough message in the output panel. To be honest I don't understand what that means.

    Below, I typed the code and the message that I received in the exit sign its really too big to show that it is complete.

    Any suggestions to solve this problem would be appreciated.

    import flash.text.TextFormat;

    Import fl.controls.TextInput;

    Import fl.controls.TextArea;

    Import fl.controls.Button;

    import flash.events.MouseEvent;

    var tf:TextFormat = new TextFormat();

    TF.font = 'Arial ';

    TF. Size = 14;

    TF. Color = "0xff0000;

    var ti: TextInput = new TextInput();

    ti.setSize (429,00, 50.00);

    TI. Move (96.00, 286.00);

    TI.editable = true;

    TI.enabled = true;

    ti.setStyle ("textFormat", tf);

    addChild (ti);

    var your: TextArea = new TextArea();

    ta.setSize (96.00, 430.00);

    rah Move (246.00, 8 pm);

    TA.editable = false;

    TA.enabled = true;

    ta.setStyle ("textFormat", tf);

    addChild (ta);

    var mybutton:Button = new Button();

    mybutton.setSize (11: 00, 25);

    MyButton.Move (21, 287);

    MyButton.label = 'submit ';

    MyButton.Toggle = true;

    addChild (mybutton);

    mybutton.addEventListener (MouseEvent.CLICK, btnHandler);

    function btnHandler(event:MouseEvent):void {}

    trace ("Success");

    }

    Type error: Error #1009: cannot access a property or method of a null object reference

    to fl.controls::TextArea/drawLayout()

    to fl.controls::TextArea/draw()

    to fl.core::uicComponent/callLaterDispatcher()

    Type error: error 2007 # child parameter must be non-null

    at flash.display::Displayobjectcontainer/addChildat()

    to fl.controls::Basebutton/drawbackground()

    to fl.controls::BaseButton/draw()

    to fl.controls::uicComponent/drawNow()

    to fl.controls::scrollBar/draw()

    to fl.controls::uicscrollBar/draw()

    first of all, fix:

    TF. Color = "0xff0000;

    that should be:

    TF. Color = "0xff0000";

    or

    TF. Color = 0xff0000;

    Then, make sure you have a textarea in your library component.  (that is to say, drag the components Panel to the stage, then remove it).

    If that does not solve the problem click the file > publishing settings > swf and check the box "enable debugging".  Repeat the test.

    the number of problematic line will be in the error message.  that indicates the object that does not exist when your code runs.

    If you do not understand how to solve the problem and the above, the number of problematic line in your code.

  • Flex components do not work after the upgrade to Flash Builder 4

    I just bought Flash Builder 4 and imported my Flex Builder 3 project. Everything worked except my Flex components that have been created in Flash Professional using the Kit of Compoent Flex may not appear at all in my Flex application. The components have been created in Flash CS3 and published to a CFC. I even tried the upgrade to Flash Professional CS5 and publish again, but that did not help. These components work in Flex Builder 3 with Flex SDK 3.2. Anyone know why they do not appear in Flash Builder 4 with Flex SDK 4.1 and AIR 2.5 SDK? I need to work with AIR SDK 2.5 so I can compile for Android. Thank you, Ryan.

    P.S. when I say that they are not I mean that they are not visible in the currently running application. Flash Builder is find in the good SWC because I instantiate components in my mxml file and it compiles without error. -Ryan

    I downloaded the SWC and looked inside.  It is not related with Flex 4

    version of the FCC.  I think you need to check your configuration.  The CFC

    would have a substantially larger size once you get it right.

  • My event.result may or may not return a node in the xml file. How can I avoid that TypeError: Error #1009:

    My event.result may or may not return a node in the xml file. How can I avoid that TypeError: Error #1009: cannot access a property or method of a null object reference.

    I have a very simple question. I want to take the value of

    Event.Result.Item.nodeindex1.nodeindex2.Row.MyValue;

    and assign it to a text field

    mytextTi.text = event.result.item.nodeindex1.nodeindex2.row.myvalue;

    But if a part of the tree is missing, which is also valid, so I get TypeError: Error #1009: cannot access a property or method of a null object reference.

    I tried various solutions such as the following. Is there any simple way to do this?

    If (event.result.item.nodeindex1.nodeindex2.row.myvalue! = undefined)-does not work

    Unfortunately, one must test all levels to ensure that it is not null before the reference to it. You can take advantage of the short-circuit evaluation in tying together, for example

    if (event.result.item
        && event.result.item.nodeindex1
        && event.result.item.nodeindex1.nodeindex2
        && event.result.item.nodeindex1.nodeindex2.row
        && event.result.item.nodeindex1.nodeindex2.row.myvalue)
    {
        // access the variable
    }
    else
    {
        // one of the XML nodes in the path is null
    }
    

    Or you could stay away from her a little hacky and wrap the reference in a try/catch block.

    -Tom

    Flex SDK engineer

  • Error #1009. Error in ActionScript in Flash game I'm doing...

    Hello

    I do a Flash game and rather than putting a .as file separate all AS3, I'm throwing on the timeline, which may or may not be a mistake since this game gets really big, really fast and messy.

    And if I get this error when I test:

    TypeError: Error #1009: cannot access a property or method of a null to GameBeta_MainTimeline_fla::MainTimeline/frame1() object reference

    What I read on that mistake, it refers to something that is not instantiated again, as something that is out of order? As I am referring to something that is not at the point in time that I refer to it? I am interested in my AS3 and I have NO idea. Here's what I wrote:

    Stop();

    TITLE PAGE

    play_game.addEventListener (MouseEvent.CLICK, startgame)

    function startgame(evt:MouseEvent):void
    {
    Stop ("Input Name");

    }

    Entry name and sex page

    var userName:String;

    inputField.addEventListener (Event.CHANGE, onInput)

    function onInput(e:Event):void
    {
    outputField.text = "If your name is" + inputField.text + "are you sure?";
    userName = inputField.text;
    }


    confirm_input.addEventListener (MouseEvent.CLICK, toCreationpg)

    function toCreationpg(evt:MouseEvent):void
    {
    Stop ("creation of Fem");
    outputField.text = "your name is" + username;
    }

    Character creation page

    readytostart.addEventListener (MouseEvent.CLICK, firstscene_plz)

    function firstscene_plz(evt:MouseEvent):void
    {
    gotoAndStop ("Day03");
    outputField.text = "Let's make your character,"+ username; "
    }

    So, any ideas as to why I get this error?

    Before I had each page with its own Actionscript and buttons inside their own clips on the timeline. Who became confused, then I took everything off the movieclips to put everything on a timeline and have a layer of Actionscript in the hope to simplify things and find the problem easier. No luck. It is supposed to have a title page and a button that goes to the 2nd page where you enter your name and as you type, it displays your name before you confirm by pressing another button that will finally to character creation page. When I test, I just get this error #1009, it will go to page 2 for the name entry, but the wacky bill text fields and does not have the key to continue. I hope that when I find the source of this error, the rest will be fixed as well.

    Thanks in advance for all advice! I'm very happy.

    There are many ways to create this error which are undetectable to inspect your fla unless you go up the steps you took to create.  and that's worth.

    and there is only one way to ensure that you will not see this error: inputField in its own layer and ensure that there is only a single keyframe in this layer.  test.  You should see no problem if you assign this instance name in this key frame (unless you have another inputField somewhere).

    from there you can begin to add keyframes and as long as you do not remove all keyframes inputField your code will continue to work.

  • Error 1009: Cannot access a property/method of a null object reference

    OK, so I've spent the last few weeks trying to figure this on my own, looking at the other tutorials and nothing has helped my situation. I am beyond frustrated with this project and I just want to find an answer quickly. I have some experience with Flash to school, but I can't understand this because it doesn't make sense to me.

    I have two main parts of my file. I have a photo gallery and I have a video. The home page allows the user to take them to a number of areas where they can see a gallery of photos or video from a certain city. Photo gallery works fine as do videos. Well, now, user can get the gallery photo to video, but when I try to set up exactly the same thing to bring video to the images it gives me an error of output message:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to 2ndtest_fla::mc_brownton_110/frame1()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    to 2ndtest_fla::mc_home_168()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    to 2ndtest_fla::MainTimeline()

    The code that works very well is as follows:

    Stop();

    function showNextPicBrownton (e: Event): void {}

                            nextFrame();

                }

    btn_next_brownton.addEventListener (MouseEvent.CLICK, showNextPicBrownton);

    function showPrevPicBrownton (e: Event): void {}

                            prevFrame();

    }

    btn_prev_brownton.addEventListener (MouseEvent.CLICK, showPrevPicBrownton);

    function showBrowntonVideo (e: Event): void {}

                            gotoAndStop (7);

    }

    btn_brownton_videofrompics.addEventListener (MouseEvent.CLICK, showBrowntonVideo);

    But where everything goes wrong here:

    function showBrowntonPhotos (e: Event): void {}

                            gotoAndStop (1);

    }

    btn_photos_brownton.addEventListener (MouseEvent.CLICK, showBrowntonPhotos);

    All this code is not on the main timeline, but in a movie clip called mc_brownton where I have the pictures and video all on the same timeline.

    If someone could help, I would be eternally grateful. I'll throw my computer against the wall.

    Click file/publish settings/flash and check "permit debugging".  Repeat the test.  the line number with the null object will be in the error message.  to highlight this line of code if you cannot solve the problem with this info.

  • AMFPHP-&gt; flex object remote Manager error events

    I use amfphp and I want that it returns an error that the flex object handler remote error will resume. At the moment I can only get the result Manager to do whatever it is in flex.

    Hello

    Try to throw an exception in the remote method. For example,.

    function inverse($x) {
        if (!$x) {
            throw new Exception('Division by zero.');
        }
        else return 1/$x;
    }

  • Local calling XML gives Error #1009: cannot access a null object

    Kind of perplexed as to what is happening...

    Calling a function "loadDownloads" which prepares to load a local file "downloads.xml" (located in the CBC even as the application mxml file); This XML file is very simple, containing a root 'downloads' with several 'download' elements it contains (each is a brief description and the url)

    I put my compiler settings for - use-network = 'false' to be able to load local XML file, and I use a HTTPService.send () to raise the load.  My HTTPService is defined as follows:

    <mx: HTTPService id="httpService" resultFormat="e4x" 
     fault="httpService_fault(event)" result="httpService_result(event)" />
    

    I put the default event handler until, in case of default, an alert indicates the error information; the result handler simply does the following:

    private function httpService_result(evt:ResultEvent):void {
         xmlContent = XML(evt.result);}
    

    Yes, all variables have been previously declared and typed.  This throws any errors (he did at the beginning, when I was incorrect for the URL file names and when I had the malformed XML instructions, so I know that Manager error works) to access the XML file

    However, when I try to access the nodes or elements in the XML document, I get this runtime Error #1009: cannot access method or property object, null, and of course, xmlContent shows as null.  Here's how I'm trying to access:

    for each (xmlDownload in xmlContent.downloads) {
         // do stuff here like...
         linkLabel.text = [email protected]();
    }
    

    All all all ideas why HTTPService is to see the XML file and says it's OK, but does not seem to extract the XML file in the xmlContent:XML object?

    Three service objects would be better.

    Also remember that you can not call a fair request after the other because you can have only active requires both.

    You must call each new request out of the resultHandler of demand of ends.

  • DateChooser and error 1009

    Could someone give me some suggestions on why the following code throws an "error 1009: cannot access a property or method of a null object reference" when the user clicks on a date in the DateChooser? Thanks for your suggestions.

    "Join Code".
    <? XML version = "1.0" encoding = "utf-8"? >
    <!--controls\date\DateChooserEvent.mxml-->
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml " width ="100% "height ="100% "borderStyle ="none"borderThickness ="2 ".
    layout = "absolute" horizontalAlign = "left" verticalAlign = "top" backgroundGradientColors = "[#666666, #ffffff]" creationComplete = "currentDate.send (); ">

    < mx:Script >

    <! [CDATA]

    Import mx.rpc.events.ResultEvent;
    Import mx.controls.Text;
    Import mx.events.CalendarLayoutChangeEvent;
    Import mx.collections.XMLListCollection;


    [Bindable]

    private var sectionList:XMLList;

    private void buildListHandler(event:ResultEvent):void
    {
    sectionList = event.result... pubDate;

    }

    private void useDate(eventObj:CalendarLayoutChangeEvent):void
    {
    Make sure that selectedDate is not null.
    If (eventObj.currentTarget.selectedDate == null) {}
    return
    } else {}
    userRequest.send ();
    }

    Access to the Date of the event object object.
    var day: text;
    var date: text;
    var month: text;
    Text: var year;
    var wholeDate:Text;
    Day.Text = eventObj.currentTarget.SelectedDate.getDay ();
    Date.Text = eventObj.currentTarget.SelectedDate.GETDATE ();
    month. Text = eventObj.currentTarget.SelectedDate.GetMonth ();
    Year.Text = eventObj.currentTarget.SelectedDate.getFullYear ();
    wholeDate.text = eventObj.currentTarget.selectedDate.getFullYear () + "/" + (eventObj.currentTar () get.selectedDate.getMonth()+1)+"/"+eventObj.currentTarget.selectedDate.getDate;)
    }

    private void onUserRequestResult(e:Event): void
    {
    buildList.send ();
    }


    []] >
    < / mx:Script >

    < mx:DateFormatter id = formatString "df" = "YYYY_MM_DD" / >

    < mx:DateFormatter id = formatString "df2" = "EEEE, MMMM DD, YYYY" / >

    < mx:DateChooser id = "dateChooser" change = "useDate (event)" showToday = 'true' "220" = x y = cornerRadius = "101" yearNavigationEnabled '14' = 'true' "
    disabledRanges = "{[{rangeEnd: new Date (2006, 4, 0)}]}" / >

    < mx:HTTPService id = url = "Sections_XML.php 'currentDate'? Date = {DF.format (new Date())} '.
    showBusyCursor = "true" result = "buildListHandler (event)" resultFormat = "e4x" > < / mx:HTTPService > "

    < mx:HTTPService id = "userRequest" result = "onUserRequestResult (event)" url = "Sections_XML.php? Date = {DF.format (dateChooser.SelectedDate)} '.
    showBusyCursor = "true" useProxy = "false" method = "POST" > < / mx:HTTPService >

    "< mx:HTTPService id ="buildList"url ="Tearsheets.xml"showBusyCursor ="true"result =" buildListHandler (event) "resultFormat ="e4x"/ >

    <! - Effects - >

    < mx: bland id = "fadeIn" duration = "3000" alphaFrom = alphaTo "0" = "1" / >
    < mx: bland id = 'fadeOut' duration = "3000" alphaFrom = alphaTo '1' = '0' / >

    <! - User interface - >
    < mx:Panel id = "tearsheetsViewPanel" title = "Documents Preview" width = "100%" height = "100%" x = "408" y = "10" >

    < mx:Tile id = "Tile" width = "100 percent" height = "100%" >
    < mx:Repeater id = dataProvider = "{sectionList.section.page 'photos'}" >
    < mx:VBox
    ' xmlns:MX =' http://www.adobe.com/2006/mxml '
    horizontalAlign = "center".
    >
    < mx:Image
    ID = "MyImage"
    source = "{photos. CurrentItem.@image}.
    buttonMode = "true".
    completeEffect = "{fadeIn}".
    a click = "navigateToURL (new URLRequest (event.currentTarget.getRepeaterItem (.@pdf)), '_blank');"
    / >
    < / mx:VBox >
    < / mx:Repeater >
    < / mx:Tile >

    < / mx:Panel >

    < / mx:Application >

    I solved the problem by rearranging the position of calendar variables:

    private void useDate(eventObj:CalendarLayoutChangeEvent):void
    {
    Make sure that selectedDate is not null.
    If (eventObj.currentTarget.selectedDate == null) {}
    Access to the Date of the event object object.
    var day: text;
    var date: text;
    var month: text;
    Text: var year;
    var wholeDate:Text;
    Day.Text = eventObj.currentTarget.SelectedDate.getDay ();
    Date.Text = eventObj.currentTarget.SelectedDate.GETDATE ();
    month. Text = eventObj.currentTarget.SelectedDate.GetMonth ();
    Year.Text = eventObj.currentTarget.SelectedDate.getFullYear ();
    wholeDate.text = eventObj.currentTarget.selectedDate.getFullYear () + "/" + (eventObj.currentTar () get.selectedDate.getMonth()+1)+"/"+eventObj.currentTarget.selectedDate.getDate;)
    } else {}
    userRequest.send ();
    }
    }

    Thanks for the help!

  • TypeError: Error #1009: question

    I placed a TabNavigator with 2 tabs, labeled hand, line1.
    On the homepage, I have several boxes of TextInput, I also TextInput boxes on the Line1 page as well.

    I have a created a public function called "public void Line1Refresh (): void. In here, everything I do is initialize the TextInput boxes with values by default until it can connect to my server and get the actual data.
    That is L1.text = "Please wait";

    In line 1 settings, I added the 'Line1RefreshI() '; call for the option to create full so that when the page is rendered, it will call this function and fill in the empty fields.
    I have the same thing for the home page as well during the initialization of the TextInputs on this page as well.

    Ok... Now for the problem...

    When the home page is visited over and called MainRefresh(); I initialize the TextInputs there in it without any problem.

    Everything worked fine until I tried also initialize the TextInput fields in the line 1 page.
    When I did that I got a:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    index / ParseReceivedData ([G:\Flex3\Index\src\Index.mxml:412])
    index / our () [G:\Flex3\Index\src\Index.mxml:170]

    Anyone know what is the problem here, why I can't access the items on a different page?


    Objects in Flex are not created until they are needed. Objects in your second tab are not yet created.

    You can set creationPolicy = "all" in your subject, definition and make all the objects to be created when the parent object is created.

    You can also use the event listener "change" of the object of the tab to initialize objects on the tab pages. This technique requires verification for the tab pages which is now a code specific page tab visible and enforcement. However, this technique allows for the page to display to the user faster.

    If there are very few items on the page, then either the creationPolicy and change event listener would be good to use.

Maybe you are looking for

  • HP Pavilion dv6-3057tx: internal battery error 601

    Hello HP Pavilion dv6-3057tx use for 4 years now I got error internal error 601 battery and asked me to press ENTER.  Today mrg from the laptop does not work. It becomes not ONE. Please give a solution for this. Thank you

  • Number of the SD card.

    Hi, Ive had the compact z3 for a month and I love it im having issues with the sd card. I got the music on my 8 GB sandisk micro sd card and used for about a year in my samsung s3 without problem, but now, when I transfer music to the card and use it

  • Ran the now computer disk management statement of bad size of HD

    I was going to create a partition on my computer with disk management. I have Windows Vista Home Premium with a 500 GB HD. I went to disk management, made the shrink option with the settings by default, and then it was 'shrinking' volume, my computer

  • 8630 ADF Duplex scanning

    Does anyone know if HP has changed the firmware in the 8630 allow ADF double face legal size analysis as previous OfficeJet Pro printers have before the firmware 8600 improved last year.

  • Dell Inspiron N5110 does not start

    Hello! I went to dell [F12] startup options and ran the diags. It throws following error message upward: Error code: 2000-0145 Validation: 45371 MSG: Hard drive 0 s/N 5VEKQY27, self test has not completed. [HD bios is detected correctly]. What should