Yeah I think we ought to have some way to access that. I've got a patch out for review which adds a "flexoptions" arg, that can contain a string that gets passed to the SWF10 backend. It currently supports a syntax like this
flexoptions(version=10.1,air) The 'flexoptions' arg is passed all the way down to the SWF10 script compiler, which decodes that to set the flex compiler command line options for AIR. I guess we could add a $air compile time constant that the compiler sets based on the flexoptions arg, or make something more general to allow the <when> tag to examine compiler properties, like <when $property="flexoptions" contains="air"> or something like that On Mon, Sep 13, 2010 at 9:19 AM, Raju Bitter < [email protected]> wrote: > Henry, > reading this, should you add a compile time constant for the AIR > runtime? Since there are AIR specific APIs/settings, and the Flex > compiler needs a different configuration to deploy AIR apps? > > Just a thought. > > On Sun, Sep 12, 2010 at 4:11 AM, Henry Minsky <[email protected]> > wrote: > > The list of possible compile time constants are these, I believe > > > > $runtime : string > > $swf7 : boolean > > $swf8 : boolean > > $as2 : boolean > > $swf9 : boolean > > $swf10 : boolean > > $as3 : boolean > > $dhtml : boolean > > $j2me : boolean > > $svg : boolean > > $js1 : boolean > > $debug : boolean > > $profile : boolean > > $backtrace : boolean > > > > > > > > On Sat, Sep 11, 2010 at 10:08 PM, Henry Minsky <[email protected]> > > wrote: > >> > >> The supported attributes for <when> are > >> > >> 'property', which looks at a boolean compile time property > >> <when property="$as3"> // checks for Boolean true > >> > >> 'property' with 'value', checks that the given compile time property > >> equals the given literal value > >> <when property="$runtime" value="swf9"> // checks for string > >> equality > >> > >> and for back compatibility, the 'runtime' attribute, equivalent to the > >> above: > >> <when runtime="swf9"> > >> > >> <unless> takes the same arguments as <when>, it just has the sense > >> inverted, so it includes it's body if > >> the condition is false. > >> > >> > >> > >> > >> On Sat, Sep 11, 2010 at 6:06 PM, Lou Iorio <[email protected]> wrote: > >>> > >>> Are <property> and <value> the only two attributes for <when>? > >>> What are the possible values? > >>> Are the attributes for <unless> the same as those for <when>? > >>> My plan is to do simple reference pages for <when>, <unless>, > >>> and <otherwise>, and link from those pages to the <switch> page. > >> > >> > >> -- > >> Henry Minsky > >> Software Architect > >> [email protected] > >> > >> > > > > > > > > -- > > Henry Minsky > > Software Architect > > [email protected] > > > > > > > -- Henry Minsky Software Architect [email protected]
