The words static and constant mean exactly that. What you want is a variable (probably protected). static constants have to be known at compile time.
1 person found this helpful
If this compiles, then the problem is that the ResourceManager is loaded with resources AFTER the static initializatino of this class occurs. You'll probalby have the same problem if you make it a static var and initialize it in the declaration of the var. However, you could make it a static var (or maybe even a static const) and initialize in the constructor of the first instance, with code like
if (DEFAULT_PROPERTY_NAME == null)
DEFAULT_PROPERTY_NAME = ResourceManager.getInstance().getString('strings', 'myVar');
By the time you are constructing instances, the ResourceManager should be loaded with resources.
Gordon Smith, Adobe
This helps. I was wondering because it does compile.
I'll give your suggestion a go