I know Introspection can tell me about classes that I’ve already instantiated, but is there a way to see what classes are actually in the program? I suspect the answer is no for many reasons ;)
What I was thinking of was being able to create a list of available subclasses that I didn’t have to update every time I added one. Something that could get a list of all the subclasses of something and make a menu of them so I could choose to create instances of them via a UI.
I could do this with a pre-compile script I think, something that looked at the code or at the actual files and figured it out and wrote me a resource file, but then I’m not sure how I would instantiate them as my code would have to access them by name after the fact somehow.
I’m really thinking it’s not going to work or not going to be worth the effort of making scripts that alter code, but since it’s an interesting idea I thought I’d ask to see if anyone else has done anything similar.