On Tue, Jan 13, 2009 at 10:19 PM, Nate Beck <[email protected]> wrote:

> I just wanted to ping everyone and get their opinion on something.  Why
> would anyone ever want to use the include directive?  I've recently been
> working on poorly designed project where at the top of every module there is
> an "include Header.as" statement that has 30 include statements within it.
>  To give a datagrid additional functionality, you give it an
> id="myDataGrid", and the include statement takes care of the rest.  It's
> really bad.
> I just don't see a good use for the include statement anymore. In my
> opinion, it just promotes bad programming practices.
> I mean, can't everything be taken care of using OOP methodologies?

The include statement is basically for static includes (compile time).
I agree that using include in AS3 is like using C-style macros in C++
(instead of inline functions, class inheritance, and such). But
sometimes that's just what you need. The Flex framework, for instance,
uses include statements to include common style metadata into various
components.

Manish

Reply via email to