Arrrrghhhhh, I knew new is a method, I can't believe I typed function, and same for putting ()s on the end of ends! (and I have fixed my code example accordingly)
As for your example, that might be just what I was looking for. The thing is, what I'm trying to do here isn't quite as simple as what I asked, because all of my objects are extending a base object. I tried my ID method just now using Globals in the types, but it kept referring to the ID assigned to the base type.
I shall proceed to test your solution in the context of my program, and edit when I see if it works.
As for your example, that might be just what I was looking for. The thing is, what I'm trying to do here isn't quite as simple as what I asked, because all of my objects are extending a base object. I tried my ID method just now using Globals in the types, but it kept referring to the ID assigned to the base type.
I shall proceed to test your solution in the context of my program, and edit when I see if it works.