4 Replies Latest reply on Jan 24, 2009 7:46 PM by WestSide

    TreeItemRenderer Woes

    WestSide Level 1
      Hi,

      I am getting an error trying to create my own TreeItemRenderer. I get an error saying "Error: 1023 Incompatible override". This is a compile time error. It points to my override function at least in FlexBuilder.

      My renderer is just a skeleton as of now but this error is preventing me from going on.

      Anyone seen this? I am using Flex 3

      Thanks,

      -Westside
        • 1. Re: TreeItemRenderer Woes
          Level 7

          "WestSide" <webforumsuser@macromedia.com> wrote in message
          news:glds85$3o$1@forums.macromedia.com...
          > Hi,
          >
          > I am getting an error trying to create my own TreeItemRenderer. I get an
          > error saying "Error: 1023 Incompatible override". This is a compile time
          > error.
          >
          > My renderer is just a skeleton as of now but this error is preventing me
          > from
          > going on.
          >
          > Anyone seen this? I am using Flex 3
          >
          > Thanks,
          >
          > -Westside
          >
          > package
          > {
          > import mx.controls.treeClasses.TreeItemRenderer;
          >
          > import mx.controls.Image;
          > import mx.controls.Tree;
          >
          > public class CustomTreeItemRenderer extends TreeItemRenderer {
          > protected var _tree:Tree;
          > protected var iconImage:Image;
          >
          > public function CustomTreeItemRenderer() {
          > super();
          > mouseEnabled = false;
          > }
          >
          > override protected function createChildren():void {
          > super.createChildren();
          > }
          >
          > }
          >
          > } // close package

          Usually that means that the signature of the function you're trying to
          override doesn't match its definition in the class you're extending.
          However, createChildren is protected in TreeItemRenderer, takes no
          arguments, and returns void. Those are usually the three places that error
          can come from. Is the error at the line "override protected function..."?

          You might also be getting a "ghost" error. I have seen this happen when
          there _was_ an error that has been fixed. To fix this, try Project>Clean.

          HTH;

          Amy


          • 2. Re: TreeItemRenderer Woes
            WestSide Level 1
            Hi,

            I too thought it was a "ghost" message, I have seen these ghost messages before. Yes, the error is at the override function. All the examples follow the same syntax so I am not sure. It *should" be working.

            Thoughts?

            -WeStSiDe
            • 3. Re: TreeItemRenderer Woes
              Level 7

              "WestSide" <webforumsuser@macromedia.com> wrote in message
              news:glefd1$k8e$1@forums.macromedia.com...
              > Hi,
              >
              > I too thought it was a "ghost" message, I have seen these ghost messages
              > before. Yes, the error is at the override function. All the examples
              > follow
              > the same syntax so I am not sure. It *should" be working.
              >
              > Thoughts?

              I've also seen this where the brackets don't match up. I'd take out all of
              the functions and put them aside in a text file, then start adding them back
              one at a time and see if that's it.

              HTH;

              Amy


              • 4. TreeItemRenderer Woes
                WestSide Level 1
                Hi,

                Restarting Flex Builder helped. It must have been a ghost message.

                Thanks!

                -Westside