This blog isn't maintained anymore. Check out my current project, an agile/scrum management tool.

Tuesday, February 26, 2008

#ifdef

EDIT: Ignore this, they got it. See the comments. Learn something new every day I guess. Don't I feel like a fool now :)

I have a new #1 feature request for Actionscript. (Actually, I guess it's a request for the compiler toolset)

Please add in #ifdef support, even if just for a predefined set of conditions.

#ifdef AIR
#ifdef NOT_AIR

Trying to dual-purpose code for web and AIR applications would be so much simpler with these constructs.

Last night I was adding a popup menu item to an app.

var menu:NativeMenu = new NativeMenu();

The app that I had worked so hard to completely abstract the AIR vs. the universal support was just AIRified. I ended up spending 20 minutes refactoring the code, but it would have been sooo nice to just #ifdef that out.

3 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home