coder and technology lover
Resolve Flex’s error: “Type was not found or was not a compile-time constant”
I just faced the terrible nightmare of “Type was not found or was not a compile-time constant” error (Flex Builder) and I lost several time to figure out what the problem was.
I realized that I was using the same name for MXML Application file which was already used by a class inside one of my packages. So, by renaming the file I solved the problem, but I was not completely satisfied and I looked for a way to avoid the error mantaining the same file/class name. Initially I tried to use namespaces, but as the reference says: “Applying a namespace means placing a definition into a namespace. Definitions that can be placed into namespaces include functions, variables, and constants (you cannot place a class into a custom namespace)”. I finally solved by renaming class references inside my package with the full qualified name (from MyClass to com.mysite.foo.MyClass)
| Print article | This entry was posted by Davide Zanotti on 2, Sunday f, 2009 at 3:23 am, and is filed under flex. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |