Jump to content
Search Community

TransformManager 1.94 and 1.941 error with spark components

chris.ncic test
Moderator Tag

Recommended Posts

Read a post, and the changelog regarding updates to handle addElement/removeElement etc for spark components. Created a simple Flex 4.1 app and when using FlexTransformManager get an error:

 

Error: removeChild() is not available in this class. Instead, use removeElement() or modify the skin, if you have one.

at spark.components::Group/removeChild()[E]

at mx.core::Container/addChildAt()[E]

 

Might be able to use TransformManager, wanted to check up on the flex version. Thanks guys, appreciate any help.

Link to comment
Share on other sites

Sorry for not throwing enough info in the last post. I appreciate the quick response too. Tried to upload the fxp, and then later the mxml i was testing with both extensions weren't allowed. I believe my error gets thrown as soon as I call addItem() using an instance of the FlexTransformManager. Will post my test mxml that I was working with. Compiling against Flex 4.1 sdk, and using TransformManager 1.941. Thanks for the your help.

 

<?xml version="1.0" encoding="utf-8"?>
xmlns:fx="http://ns.adobe.com/mxml/2009" 
xmlns:s="library://ns.adobe.com/flex/spark" 
xmlns:mx="library://ns.adobe.com/flex/mx" 
width="100%" height="100%" 
creationComplete="_onCreationComplete();">






Link to comment
Share on other sites

This one stumps me some. Throws same error.

 

<?xml version="1.0" encoding="utf-8"?>
xmlns:fx="http://ns.adobe.com/mxml/2009" 
xmlns:s="library://ns.adobe.com/flex/spark" 
xmlns:mx="library://ns.adobe.com/flex/mx" 
width="100%" height="100%" 
creationComplete="_onCreationComplete();">






Link to comment
Share on other sites

I'll mention a few things:

 

1) If you addElement() an object to a Spark component, you cannot then addChild() to a non-spark component without Flash/Flex throwing an error. Unbelievable, I know. Their components aren't smart enough to handle that situation - they expect you to manually removeElement() first and then addChild(). Ugh. I just uploaded a new FlexTransformManager that runs some conditional logic to work around that issue.

 

2) Typically FlexTransformManager is intended to be used in MXML, like . Not that it's "wrong" to do it the way you did, but the other way defines the width/height which directly impact the bounds which are necessary to work around other bugs in the Flex framework. (Can you see why I'm not a big fan of Flex?)

 

3) It looks like you already noticed your error in this regard, but don't try to call addElement()/removeElement() on a FlexTransformManager - there are no such methods. You use addChild()/removeChild().

 

Does that clear things up for you?

Link to comment
Share on other sites

i appreciate all the help. i think for now i may utilize the standard TransformManager. did some previous testing and it seemed ok in the same mxml code i posted. thought there might be some benefit to using the flex version, but if there are no limitations with the standard one i'm fine with that.

Link to comment
Share on other sites

Hello,

 

I have a problem that is related to the new update, Here is a simple example :




 

Here is the error :

TypeError: Error #1034: Failed to type constraint : conversion of mx.core::UITextField@dc8e901 in mx.core.IVisualElement impossible.
at com.greensock.transform::FlexTransformManager/addChild()[D]
at com.greensock.transform::TransformItem/onAddedToStage()[D]
at flash.display::DisplayObjectContainer/addChildAt()
at mx.managers::SystemManager/preloader_preloaderDoneHandler()[E]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/displayClassCompleteHandler()[E]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::SparkDownloadProgressBar/initCompleteHandler()[E]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/dispatchAppEndEvent()[E]
at mx.preloaders::Preloader/appCreationCompleteHandler()[E]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E]
at mx.core::UIComponent/set initialized()[E]
at mx.managers::LayoutManager/doPhasedInstantiation()[E]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E]

 

Do you have any suggestion ?

 

Best regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...