Ok, I have a TMap with custom types in it
I want to return a type instance from the map, using ValueForKey and then run a method in the returned instance
If I simply return the instance to a variable, it complains that the method doesnt exist and wont compile the program
If I declair the variable to be of the same custom type, it complains that it cant convert from Object to the custom type
The only way around this I can think of is to somehow get ValueForKey to return the instance as its type, instead of as an object
However I've been unable to find a way to do this
I want to return a type instance from the map, using ValueForKey and then run a method in the returned instance
If I simply return the instance to a variable, it complains that the method doesnt exist and wont compile the program
If I declair the variable to be of the same custom type, it complains that it cant convert from Object to the custom type
The only way around this I can think of is to somehow get ValueForKey to return the instance as its type, instead of as an object
However I've been unable to find a way to do this