rldjrsksl / flex-iframe

Automatically exported from code.google.com/p/flex-iframe
0 stars 0 forks source link

Flash Builder 4 error: The supplied DisplayObject must be a child of the caller. #77

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm trying to use flex-iframe in Flash Builder 4. I'm creating a project 
with similar content to SimpleHtml example. On startup, I get the 
following error. Can you please advise?

BTW, I did apply the wmode=opaque to index.template.html. My mxml file is 
also at the end of this error listing.

Flash Builder 4 Error

ArgumentError: Error #2025: The supplied DisplayObject must be a child of 
the caller.
    at flash.display::DisplayObjectContainer/getChildIndex()
    at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawC
hildren_getChildIndex()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\managers\SystemManager.as:2017]
    at mx.managers::SystemRawChildrenList/getChildIndex()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\managers\SystemRawChildrenList.as:181
]
    at com.google.code.flexiframe::IFrame/buildContainerList()
[/home/nicoulaj/projects/flex/flex-
iframe/library/src/com/google/code/flexiframe/IFrame.as:715]
    at com.google.code.flexiframe::IFrame/createChildren()
[/home/nicoulaj/projects/flex/flex-
iframe/library/src/com/google/code/flexiframe/IFrame.as:282]
    at mx.core::UIComponent/initialize()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\UIComponent.as:7250]
    at mx.core::Container/initialize()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:3129]
    at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded
()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\UIComponent.as:7142]
    at 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Container.as:3951]
    at mx.core::Container/addChildAt()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:2616]
    at mx.core::Container/addChild()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:2534]
    at mx.core::Container/createComponentFromDescriptor()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:4371]
    at mx.core::Container/createComponentsFromDescriptors()
[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Container.as:4160]
    at mx.containers::Panel/createComponentsFromDescriptors()
[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\containers\Panel.as:1685]
    at mx.core::Container/createChildren()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:3187]
    at mx.containers::Panel/createChildren()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\containers\Panel.as:1198]
    at mx.core::UIComponent/initialize()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\UIComponent.as:7250]
    at mx.core::Container/initialize()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:3129]
    at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded
()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\UIComponent.as:7142]
    at 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Container.as:3951]
    at mx.core::Container/addChildAt()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:2616]
    at mx.core::Container/addChild()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:2534]
    at mx.core::Container/createComponentFromDescriptor()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:4371]
    at mx.core::Container/createComponentsFromDescriptors()
[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Container.as:4160]
    at mx.core::Container/createChildren()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:3187]
    at mx.core::UIComponent/initialize()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\UIComponent.as:7250]
    at mx.core::Container/initialize()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Container.as:3129]
    at mx.core::Application/initialize()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\core\Application.as:1049]
    at FlexIFrame/initialize()
    at mx.managers.systemClasses::ChildManager/childAdded()
[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\managers\systemClasses\ChildManager.a
s:189]
    at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow
()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\managers\systemClasses\ChildManager.a
s:341]
    at mx.managers::SystemManager/initializeTopLevelWindow()
[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\managers\SystemManager.as:2810]
    at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kick
Off()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\managers\SystemManager.as:2637]
    at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::prel
oader_completeHandler()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\managers\SystemManager.as:2539]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler()[E:\dev\4.0.0
\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()

My mxml file:

<?xml version="1.0" encoding="utf-8"?>
<mx: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"
               xmlns:flexiframe="http://code.google.com/p/flex-
iframe/"
               >
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value 
objects) here -->
    </fx:Declarations>

    <!-- A local Html page embedded -->
    <mx:Panel title="A simple Html page embedded"
              width="80%"
              height="80%">

        <flexiframe:IFrame id="myFrame"
                           width="100%"
                           height="100%"

source="www.google.com"/>

    </mx:Panel>

</mx:Application>

Original issue reported on code.google.com by diran...@gmail.com on 21 Apr 2010 at 10:32

GoogleCodeExporter commented 8 years ago

Original comment by Julien.N...@gmail.com on 14 May 2010 at 3:28

GoogleCodeExporter commented 8 years ago

Original comment by Julien.N...@gmail.com on 14 May 2010 at 3:28

GoogleCodeExporter commented 8 years ago
 I hava been using flex-iframe in flash builder 4,but when i use callIFrameFunction method,it worked good in ff,but it couldn't work in ie,please help me!!!

I found callIFrameFunction couldn't get iframe's document innerHTML.

Original comment by yangyang...@163.com on 19 Oct 2010 at 6:53

GoogleCodeExporter commented 8 years ago
Hi yangyang, I use flex-iframe in my app and it works like a charm, haha... 
That may be caused because the style in ff is handled with the "px" at the end, 
while in IE isn't the same

Original comment by neolink2...@gmail.com on 20 Dec 2010 at 8:49