Skip to main content
Participating Frequently
January 5, 2009
Question

Reading config.xml

  • January 5, 2009
  • 2 replies
  • 469 views
Hey,

I wanna to add a custom configuration on config.xml

What is the best approach to do that?

VELO
This topic has been closed for replies.

2 replies

Participating Frequently
January 16, 2009
I figure out I could do what I wanna by adding entries at:
flex2.compiler.common.CompilerConfiguration

For posterity, like this:
/*
* This is never null. If you specify "no locales"
* with -locale= then it is an empty array.
*/
private String[] locales = new String[] {};

public String[] getLocales()
{
return locales;
}

public String locale()
{
return locales.length > 0 ? locales[0] : null;
}

public void cfgLocale( ConfigurationValue cv, String[] newLocales )
{
locales = (String[])merge(newLocales, locales, String.class);
}

public static ConfigurationInfo getLocaleInfo()
{
return new ConfigurationInfo( -1, new String[] { "locale-element" } )
{
public boolean allowMultiple()
{
return true;
}
};
}

Thanks Paul!

VELO
Participant
January 13, 2009
Are you asking about how to extend the compiler to support custom additions to flex-config.xml?