We realized that the flex compiler really needs 'override' declarations to
be correct  in the JS2 that it emits for user-defined classes,
for all methods that override superclass methods.

So we're working on making the ClassCompiler add them automatically. This
means that the schema has to contain information about all the methods
in the LFC classes, not just the attributes  and events. So I am going to be
adding  method declarations for all the known LFC methods to the
lfc.lzxschema file.

I am going to be adding an optional "final" attribute that methods can be
given, to indicate that they should not be overridden in subclasses.

We're also thinking of supporting an "override" attribute on methods, e.g.,

    <method name="addSubview" override="true">

This would be  optional but useful as documentation, and the compiler could
help correct you if you had a type-o and
were overriding a non-existent method that you thought existed, or bashing a
superclass method that you forgot about.

It also would provide a manual 'override' in  case you are subclassing an
LFC or other class for which the compiler
does not have a schema entry for the methods. This should not normally
happen, but
would provide an escape mechanism in case the schema were out of sync with
the LFC and some methods
were  not declared that you really had to override in your LZX  class.






-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to