Introspection Class Constants

Greetings all,

I’ve been looking around Introspection. Is it not possible to read class constants using Introspection?

Cheers
Grant

Correct, you cannot.

Most constants in your project are basically turned into literal values and compiled
So they have no more existence that writing the value itself

The only exception is dynamic strings, or more properly localizable strings, which are turned into a method that dynamically fetches the right value

[quote=355679:@Norman Palardy]Most constants in your project are basically turned into literal values and compiled
So they have no more existence that writing the value itself

The only exception is dynamic strings, or more properly localizable strings, which are turned into a method that dynamically fetches the right value[/quote]

Drat!! I wanted a elegant way of storing bit flag names and their associated values. I guess I’ll just do it another way…attributes??

Cheers
Grant

Computed properties that return literals?

Thanks Kem…just gave me an idea which would not require tons of work to get going.

Cheers
Grant