Hi there!
While exploring Flex 3 (really neat btw) and building my
first app, I tried the following:
public class X extends EventDispatcher {}
This gives me a compile time error #1017: The definition of
the base class EventDispatcher was not found.
To compile I am simply use a .bat file, such as those used in
the samples. Everything compiles normally without extending an
existing class (in this case flash.events.EventDispatcher).
Trying to change the compiler options with
-library-path+=c:\flex\framework\libs
resulted in the same error here (and I guess that's already a
default setting).
Any help would be greatly appreciated!
Fre
definition of base class _ not found
You'll need to import the EventDispatcher class via an import
statement to instruct the compiler where the EventDispatcher class
can be found. So, try this:
package
{
import flash.events.EventDispatcher;
public class X extends EventDispatcher {}
}definition of base class _ not found
That worked :-). Thanks a lot, Deepa!
So apparently you can make import statements below the class
declaration (or anywhere in the code), but always before you are
using the imported class. I got confused, as in java all import
statements are in one place and the flash.net imports worked below
my class declaration.
Subscribe to:
Post Comments
(Atom)
No comments:
Post a Comment