Skip to content
This repository was archived by the owner on Mar 23, 2019. It is now read-only.
This repository was archived by the owner on Mar 23, 2019. It is now read-only.

Error #1007: Instantiation attempted on a non-constructor. at flexlib.containers::WindowShade/createOrReplaceHeaderButton()[/Users/groumly/Development/workspace-3.5-flex4/FlexLib/src/flexlib/containers/WindowShade.as:258] #357

Description

@nicoulaj

Originally filed by siddh...@gmail.com on 2011-04-25T05:31:41

What steps will reproduce the problem?

  1. When swf file is loaded in top of mainApplication Swf (or Wrapper file) file.
  2. When moving from Flex 3 to Flex 4

What is the expected output? What do you see instead?
We should be able to see the window shade component ( button) .
We are not able to see the button
Error message is displayed

  TypeError: Error #1007: Instantiation attempted on a non-constructor.
at flexlib.containers::WindowShade/createOrReplaceHeaderButton()
at flexlib.containers::WindowShade/createChildren()
at mx.core::UIComponent/initialize()
at mx.core::Container/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/addChildAt()
at mx.core::Container/addChild()

What version of the product are you using? On what operating system?
Flex builder 4.0 and SDK 4.1.0

Please provide any additional information below.

My Wrapper file (Main Application.mxml )

<?xml version="1.0" encoding="utf-8"?> 
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="actionScriptFunction()" >

    <fx:Script> 
        <![CDATA[ 
            import flash.external.*; 
            import mx.controls.Alert;
            import mx.core.FlexGlobals;

            public function init(event : Event):void 
            { 

                myLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); 

            } 

            private function ioErrorHandler(event:IOErrorEvent):void { 
                trace("ioErrorHandler: " + event); 
            } 


            public function actionScriptFunction():void 
            { 

                myLoader.source = FlexGlobals.topLevelApplication.parameters.automationswfurl; <!-- + "?" + urlVars.toString();--> 
            }             


        ]]> 
    </fx:Script> 

    <mx:SWFLoader  id="myLoader"   width="100%" height="100%" loadForCompatibility="true"
                   preinitialize="myLoader.loaderContext = new LoaderContext(false, ApplicationDomain.currentDomain)"> 
    </mx:SWFLoader> 


</s:Application>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions