How to make auto-complete work in custom components in Flash MX 2004

I just finished the custom actiosn portion of our BLDoc project and ran across Gregg Wygonik’s blog entry asking about code hints for custom components.

When you create your custom actions file as long as you use the form id="[com.blinex.charts.AreaChart]" for your classes then you’ll get code hints on strongly typed variables. The id must be the fully qualified class name and must be enclosed inside square brackets. This provide code hints both for variables declared using the fully qualified name and when the class is imported.

To get the code-hinting on the colon, the list of classes, you need to add a new folder to you custom actions that lists types. Here’s an example from our B-Line Charting Components 3.0, which will be released any day now.

<folder
   name="Types"
   id="Types"
   index="true"
   tiptext="Types that can be used for strong typing"
   helpid="0">

   <string
      name="AreaChart"
      tiptext="AreaChart type"
      text="AreaChart"
      helpurl="Help/BLineCharting30/content_72c6061a.htm" />

   <string
      name="BoxChart"
      tiptext="BoxChart type"
      text="BoxChart"
      helpurl="Help/BLineCharting30/content_23f3e2f8.htm" />

   <string
      name="BubbleChart"
      tiptext="BubbleChart type"
      text="BubbleChart"
      helpurl="Help/BLineCharting30/content_8497b033.htm" />
   .
   .
   .
</folder>

There is a big catch though, the suffix style code hints don’t support id’s that have a period in them. If you’re going to set up suffixes you have to use an id such as id="comblinexchartsAreaChart" which of course breaks the typed hints.

So, component developers have to choose–do they want to support typed hints or suffixed hints?

11 thoughts on “How to make auto-complete work in custom components in Flash MX 2004

  1. somehow i knew you or Chafic would be the ones to know. :-D

    thanks much!

    personally, i perfer typed hints, so i think my components will go that route. makes it easier then trying to remember all the necessary suffixes and gets the user into the habit of using typed variables.

    thanks again! you rule! :-)
    g.

  2. somehow i knew you or Chafic would be the ones to know. :-D

    thanks much!

    personally, i prefer typed hints, so i think my components will go that route. makes it easier then trying to remember all the necessary suffixes and gets the user into the habit of using typed variables.

    thanks again! you rule! :-)
    g.

  3. Its like you read my mind! You seem to know so much approximately this, like you wrote the ebook in it or something. I feel that you just can do with a few p.c. to pressure the message house a bit, but other than that, this is wonderful blog. A fantastic read. I’ll certainly be back.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>