---
id: 142
title: >-
  Adobe Flex : There is a bug in the Adobe Flex Framework ToolTipManager
  Implementation
slug: >-
  adobe-flex-there-is-a-bug-in-the-adobe-flex-framework-tooltipmanager-implementation
date: '2008-06-20T09:45:00Z'
modified: '2008-06-20T09:45:00Z'
status: publish
type: post
author: pmoelgaard
categories:
  - ActionScript 3.0
  - Adobe Flex
tags:
  - Bug Report
excerpt: null
canonicalPath: >-
  /posts/adobe-flex-there-is-a-bug-in-the-adobe-flex-framework-tooltipmanager-implementation
featuredImage: null
commentCount: 0
wordCount: 220
readingTimeMinutes: 1
hasMedia: false
hasVideos: false
url: >-
  https://forwardthinking.pemo.me/posts/adobe-flex-there-is-a-bug-in-the-adobe-flex-framework-tooltipmanager-implementation
---
I have registered it with the Adobe Flex Team. [https://bugs.adobe.com/jira/browse/SDK-15863](https://bugs.adobe.com/jira/browse/SDK-15863) When using a CustomToolTip set via the ToolTipmanager.toolTipClass property, "text" is never invoked. Its easily solved however, it just requires you to override commitProperties and set the text yourself.

```jscript
override protected function commitProperties():void
  {
   super.commitProperties();
   text = ToolTipManager.currentTarget[ "toolTip" ];
  }
```

And here is a complete implementation of a custom tooltip.

```jscript
package
{
 import mx.containers.Canvas;
 import mx.controls.Button;
 import mx.core.IToolTip;
 import mx.managers.ToolTipManager;

 public class CustomToolTip extends Canvas implements IToolTip
 {
  private var _button:Button;

  public function CustomToolTip()
  {
   super();
  }

  override protected function createChildren():void
  {
   super.createChildren();
   _button = new Button();
   addChild( _button );
  }

  override protected function commitProperties():void
  {
   super.commitProperties();
   text = ToolTipManager.currentTarget[ "toolTip" ];
  }

  public function get text() : String
  {
   return _button.label;
  }
  public function set text( value:String ) : void
  {
   _button.label = value;
  }
 }
}
```

I suppose you can also workaround it by changing the ToolTipManagerImpl class, but I prefer not to change the framework sourcecode for so many reasons that its beyond the scope of this post. Also, I really dislike every sample out there illustrating how to implement custom tooltips, as they all involve calling a method on a toolTip event and hence requires you to use your custom ToolTip logic everywhere in your system instead of using the framework.
