is this technique I describe actually superclass acessing subclass data
No.
Superclass objects cannot get to the constant - only objects in the sub-class in question.
What you are defining is an abstract interface - every Question class should have a get_table_name method (or whatever your constant is called).
Each sub-class is then giving its own concrete implementation to get_table_name (or whatever).
It's a commonly accepted technique.
Take a look at Refactoring: Soft-code class name in factory method and Re: Re: Extending object you don't create which do similar things with class names rather than table names.
In reply to Re: Superclass acessing sublass data
by adrianh
in thread Superclass acessing sublass data
by pauloschreiner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |