flex-users / flex-iframe

IFrame component for Flex applications.
github.com/flex-users/flex-iframe
120 stars 63 forks source link

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

Open nicoulaj opened 13 years ago

nicoulaj commented 13 years ago

Originally filed by yaza...@yahoo.com on 2010-04-21T22:32:30

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

/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

nicoulaj commented 13 years ago

Updated by Julien.N...@gmail.com on 2010-05-14T15:28:18

Original ticket set status to Accepted (we converted to open)

nicoulaj commented 13 years ago

Updated by yangyang...@163.com on 2010-10-19T06:53:47

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.

nicoulaj commented 13 years ago

Updated by neolink2...@gmail.com on 2010-12-20T20:49:07

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