kingyiren / flex-object-handles

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

AddChild error, Flex expected addEvent #51

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. When I use Flex 3 SDK and ObjectHandles-2.0.0008_FLEX4.swc everything is ok
2.I create new project in Flex 4 or Flex 4.5 simple function:

var oh:ObjectHandles = new ObjectHandles(this.canvas);
oh.registerComponent(img,img);

where this this canvas is a simple canvas
and img is a standard Image component from Flex SDK
3. During compiling I get error:
Error: addChild() is not available in this class. Instead, use addElement() or 
modify the skin, if you have one.
    at spark.components.supportClasses::SkinnableComponent/addChild()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:1038]
    at com.roguedevelopment.objecthandles::Flex3ChildManager/addChild()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/Flex3ChildManager.as:25]
    at com.roguedevelopment.objecthandles::ObjectHandles/addToContainer()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/ObjectHandles.as:1437]
    at com.roguedevelopment.objecthandles::ObjectHandles/createHandle()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/ObjectHandles.as:1322]
    at com.roguedevelopment.objecthandles::ObjectHandles/createHandlesFor()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/ObjectHandles.as:1284]
    at com.roguedevelopment.objecthandles::ObjectHandles/setupHandles()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/ObjectHandles.as:1255]
    at com.roguedevelopment.objecthandles::ObjectHandles/onSelectionAdded()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/ObjectHandles.as:489]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.roguedevelopment.objecthandles::ObjectHandlesSelectionManager/addToSelected()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/ObjectHandlesSelectionManager.as:68]
    at com.roguedevelopment.objecthandles::ObjectHandlesSelectionManager/setSelected()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/ObjectHandlesSelectionManager.as:81]
    at com.roguedevelopment.objecthandles::ObjectHandles/handleSelection()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/ObjectHandles.as:1205]
    at com.roguedevelopment.objecthandles::ObjectHandles/onComponentMouseDown()[/Users/mhughes/projects/personal/ObjectHandles/flex-object-handles-2/src/com/roguedevelopment/objecthandles/ObjectHandles.as:507]

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Flex 4 and Flash 4.5

Please provide any additional information below.

Original issue reported on code.google.com by slash...@gmail.com on 28 Jun 2011 at 9:05

GoogleCodeExporter commented 8 years ago
version of product is ObjectHandles-2.0.0008
and I use proper version for Flex 4 which is ObjectHandles-2.0.0008_FLEX4.swc

Original comment by slash...@gmail.com on 28 Jun 2011 at 9:08