#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.
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:
http://www.boostworthy.com/blog/?p=227
By
Anonymous, At
2/27/2008 11:28 AM
http://blogs.adobe.com/flexdoc/conditionalcompilation.pdf
By
Unknown, At
2/27/2008 11:34 AM
WOW.
I didn't know that.
This rocks, thanks guys!
By
Marc, At
2/27/2008 11:36 AM
Post a Comment
Subscribe to Post Comments [Atom]
<< Home