In attempting to adapt the Arch101 sample I come to the usage of enums in the model. I think I understand them to function as an entity used to enforce type checking.
Yes?
The 2 sample enum structures provided are both used to populate a dropdown in view components. The statement that creates the constants on which the enums are based will hardcode the items into the class.
public static const ADMIN:RoleEnum
= new RoleEnum( 'Administrator', 0);
public static const ACCT_PAY:RoleEnum
= new RoleEnum( 'Accounts Payable', 1);
& so on.
But what if the contents of the list is itself, db-driven and not known at compile time.
Can those static constants be generated at runtime?
thx