4 Replies Latest reply on Feb 7, 2009 9:05 PM by blake_

    Package Problems (Id 1061: Call to a possibly undefined)

    blake_
      I've been having a problem with not just my own code, but code from various tutorials in books and around the 'net, and it's obviously something stupid but I can't seem to puzzle it out. But in boiling the problem down to explain it, I think I have a clue.

      The problem is that my external action script classes are not being correctly interpreted by Flex Builder. FB doesn't put in the import statements automatically, doesn't do code completion right, and complains that the class's properties may not exist when I try to use them.

      I've created two classes that are identical, except one I created fresh, and it works, where the other is an old version stripped down. I've attached the code, but I don't think it's relevant.

      What I've noticed, now that I boil it down, is that the one that's not working has a blue icon while the working ones have black icons. I can't seem to find a legend anywhere, and from their properties, the files look identical.


      Screenshot of problem. The AClass and Another classes work fine, but Winc does not.


      Does anyone have any idea? This has been tormenting me for a while.
        • 1. Re: Package Problems (Id 1061: Call to a possibly undefined)
          Level 7

          "blake_" <webforumsuser@macromedia.com> wrote in message
          news:gmjute$bu$1@forums.macromedia.com...
          > I've been having a problem with not just my own code, but
          > code
          > from various tutorials in books and around the 'net, and it's obviously
          > something stupid but I can't seem to puzzle it out. But in boiling the
          > problem
          > down to explain it, I think I have a clue.
          >
          > The problem is that my external action script classes are not being
          > correctly
          > interpreted by Flex Builder. FB doesn't put in the import statements
          > automatically, doesn't do code completion right, and complains that the
          > class's
          > properties may not exist when I try to use them.
          >
          > I've created two classes that are identical, except one I created fresh,
          > and
          > it works, where the other is an old version stripped down. I've attached
          > the
          > code, but I don't think it's relevant.
          >
          > What I've noticed, now that I boil it down, is that the one that's not
          > working
          > has a blue icon while the working ones have black icons. I
          > can't
          > seem to find a legend anywhere, and from their properties, the files look
          > identical.
          >
          >
          > http://tinypic.com/view.php?pic=edml5&s=5. The AClass and Another classes
          > work
          > fine, but Winc does not.
          >
          >
          > Does anyone have any idea? This has been tormenting me for a while.
          >
          > package junk.temp.discard
          > {
          > public class Another
          > {
          > public function Another()
          > {
          > }
          >
          > public function aProperty(): uint
          > {
          > return 10;
          > }
          >
          > }
          > }

          All my as files have red icons, so I'm not sure what colors you get when you
          don't have Flash installed. Why don't you post the _contents_ of your
          classes?


          • 2. Re: Package Problems (Id 1061: Call to a possibly undefined)
            blake_ Level 1
            >All my as files have red icons, so I'm not sure what colors you get when
            > you don't have Flash installed. Why don't you post the _contents_ of your
            >classes?

            That IS the content of my classes.

            I have one called Winc and one called AClass and one called Another. They each have one public function called aProperty that returns the integer value 10. They're all in the same package, junk.temp.discard.

            FB let's me use aProperty of AClass and aProperty of Another, but not aProperty of Winc!

            OK, now I've "fixed" it by renaming the class. Maybe the problem is old versions of files being used over newer ones? Could it be an outdated .actionScriptProperties file or some conflict in all the Eclipse meta-data?

            It's now at least objecting to the fact that I have a Winc.MXML and a Winc.as. I can understand that being an issue.
            • 3. Re: Package Problems (Id 1061: Call to a possibly undefined)
              levancho Level 3
              in my case blue icon next to .as files means that file is Module, or Main application,and always if file has blue icon that file is present somewhere in .actionScriptProperties file.
              I would completely delete and recreate the project and that should solve all issues,
              • 4. Re: Package Problems (Id 1061: Call to a possibly undefined)
                blake_ Level 1
                I think you're right, levancho, thanks.