4

I'm currently creating a class that extends UIComponent in Flex 3, but when the flash builder try to compile show me some errors

1044: Interface method createAutomationIDPartWithRequiredProperties in namespace mx.automation:IAutomationObject not implemented by class components:ArtWorkImage

1044: Interface method get automationEnabled in namespace mx.automation:IAutomationObject not implemented by class com.senocular.display:TransformTool

I see that UIComponent implements this interface, but I had never had this error before, I'm assuming UIComponent should made this implementation by default, so it should be something else, I already try to recreate the project or clean it, with no result, can someone please point me how maybe this can be fix, thanks for your help

oh btw I had this project before in flex builder, exported as a FXP and imported in Flash Builder, thanks!

goseta
  • 770
  • 1
  • 7
  • 26

1 Answers1

0

All UI objects use an Automation delegate to handle implementation of the automation interface. Each UIComponent has a specific automation delegate registered with the Automation Framework. These automation delegate implementations are injected into the object by the Automation framework when the object is created according to the class name of the object.

For example:

  • UIComponent <- UIComponentAutomationImpl
  • ToolTip <- ToolTipAutomationImpl
  • DateChooser <- DateChooserAutomationImpl

Normally if you subclass a component you should inherit the Automation Implementation. However depending upon how the instances of the object are being created the automation framework may not be able to resolve the class name to the appropriate super class. In this case you may need to take additional steps to get the automation implementation into your class.

If you want your class to automatically be injected with a particulary automation implementation you should call the static registerDelegateClass method on the mx.automation.Automation class.

import mx.automation.*

Automation.registerDelegateClass(com.foo.bar.ArtWorkImage, mx.automation.delelegates.core.UIComponentAutomationImpl);

Alternatively you could directly implement the IAutomationObject methods in your UIComponent or create your own delegate class and instantiate and "inject" it into your class in its' constructor thereby by passing the Automation framework.


Here are few links that might help you understand the automation framework:


http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/automation/Automation.html http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/automation/delegates/core/UIComponentAutomationImpl.html http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/automation/package-detail.html

Justin Ohms
  • 3,334
  • 31
  • 45